mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Big redesign (closer to Win10 UWP)
Replaced breadcrumb with Up button Search button now integrated in top menu Hamburger menu make better use of visual states Better visual states changes when size changes
This commit is contained in:
@@ -51,19 +51,7 @@ namespace ModernKeePass.Views.UserControls
|
||||
typeof(string),
|
||||
typeof(HamburgerMenuUserControl),
|
||||
new PropertyMetadata("Title", (o, args) => { }));
|
||||
|
||||
public object ResizeTarget
|
||||
{
|
||||
get { return GetValue(ResizeTargetProperty); }
|
||||
set { SetValue(ResizeTargetProperty, value); }
|
||||
}
|
||||
public static readonly DependencyProperty ResizeTargetProperty =
|
||||
DependencyProperty.Register(
|
||||
nameof(ResizeTarget),
|
||||
typeof(object),
|
||||
typeof(HamburgerMenuUserControl),
|
||||
new PropertyMetadata(null, (o, args) => { }));
|
||||
|
||||
|
||||
public Visibility IsButtonVisible
|
||||
{
|
||||
get { return (Visibility)GetValue(IsButtonVisibleProperty); }
|
||||
@@ -112,19 +100,7 @@ namespace ModernKeePass.Views.UserControls
|
||||
typeof(int),
|
||||
typeof(HamburgerMenuUserControl),
|
||||
new PropertyMetadata(-1, (o, args) => { }));
|
||||
|
||||
public bool IsOpen
|
||||
{
|
||||
get { return (bool)GetValue(IsOpenProperty); }
|
||||
set { SetValue(IsOpenProperty, value); }
|
||||
}
|
||||
public static readonly DependencyProperty IsOpenProperty =
|
||||
DependencyProperty.Register(
|
||||
nameof(IsOpen),
|
||||
typeof(bool),
|
||||
typeof(HamburgerMenuUserControl),
|
||||
new PropertyMetadata(false, (o, args) => { }));
|
||||
|
||||
|
||||
public ICommand ActionButtonCommand
|
||||
{
|
||||
get { return (ICommand)GetValue(ActionButtonCommandProperty); }
|
||||
@@ -143,5 +119,12 @@ namespace ModernKeePass.Views.UserControls
|
||||
{
|
||||
SelectionChanged?.Invoke(sender, e);
|
||||
}
|
||||
|
||||
private void ToggleButton_OnUnchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var parent = Parent as FrameworkElement;
|
||||
if (parent == null) return;
|
||||
VisualStateManager.GoToState(this, parent.ActualWidth <= 640 ? "Hidden" : "Collapsed", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user