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:
Geoffroy BONNEVILLE
2020-05-04 20:56:19 +02:00
parent b3c7683c12
commit 2f30389f6c
15 changed files with 378 additions and 296 deletions

View File

@@ -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);
}
}
}