mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Hamburger menu button visibility is now a property
Hamburger menu now has a display member path property
This commit is contained in:
@@ -7,7 +7,6 @@ using ModernKeePass.Interfaces;
|
||||
|
||||
namespace ModernKeePass.Views.UserControls
|
||||
{
|
||||
// TODO: Add a property (string path) that allows chosing which field to display
|
||||
public sealed partial class HamburgerMenuUserControl
|
||||
{
|
||||
public HamburgerMenuUserControl()
|
||||
@@ -32,7 +31,6 @@ namespace ModernKeePass.Views.UserControls
|
||||
get { return (string)GetValue(ButtonLabelProperty); }
|
||||
set { SetValue(ButtonLabelProperty, value); }
|
||||
}
|
||||
// TODO: set a boolean that will show/hide the button when a value is set/not set
|
||||
public static readonly DependencyProperty ButtonLabelProperty =
|
||||
DependencyProperty.Register(
|
||||
"ButtonLabel",
|
||||
@@ -40,6 +38,18 @@ namespace ModernKeePass.Views.UserControls
|
||||
typeof(HamburgerMenuUserControl),
|
||||
new PropertyMetadata("Button", (o, args) => { }));
|
||||
|
||||
public string DisplayMemberPath
|
||||
{
|
||||
get { return (string)GetValue(DisplayMemberPathProperty); }
|
||||
set { SetValue(DisplayMemberPathProperty, value); }
|
||||
}
|
||||
public static readonly DependencyProperty DisplayMemberPathProperty =
|
||||
DependencyProperty.Register(
|
||||
"DisplayMemberPath",
|
||||
typeof(string),
|
||||
typeof(HamburgerMenuUserControl),
|
||||
new PropertyMetadata("Name", (o, args) => { }));
|
||||
|
||||
public object ResizeTarget
|
||||
{
|
||||
get { return GetValue(ResizeTargetProperty); }
|
||||
@@ -52,6 +62,18 @@ namespace ModernKeePass.Views.UserControls
|
||||
typeof(HamburgerMenuUserControl),
|
||||
new PropertyMetadata(null, (o, args) => { }));
|
||||
|
||||
public bool IsButtonVisible
|
||||
{
|
||||
get { return (bool)GetValue(IsButtonVisibleProperty); }
|
||||
set { SetValue(IsButtonVisibleProperty, value); }
|
||||
}
|
||||
public static readonly DependencyProperty IsButtonVisibleProperty =
|
||||
DependencyProperty.Register(
|
||||
"IsButtonVisible",
|
||||
typeof(bool),
|
||||
typeof(HamburgerMenuUserControl),
|
||||
new PropertyMetadata(false, (o, args) => { }));
|
||||
|
||||
public IEnumerable<IPwEntity> ItemsSource
|
||||
{
|
||||
get { return (IEnumerable<IPwEntity>)GetValue(ItemsSourceProperty); }
|
||||
|
Reference in New Issue
Block a user