mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
GroupDetailPage uses navigation service
This commit is contained in:
@@ -72,7 +72,15 @@
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Border BorderBrush="White" BorderThickness="0,0,0,1" />
|
||||
<Button Padding="0" Height="{StaticResource MenuSize}" Margin="0" Visibility="{Binding IsButtonVisible, ElementName=UserControl}" Style="{StaticResource NoBorderButtonStyle}" Background="Transparent" BorderThickness="0" Width="{StaticResource ExpandedMenuSize}" HorizontalContentAlignment="Left" Click="ButtonBase_OnClick">
|
||||
<Button Padding="0" Margin="0"
|
||||
Height="{StaticResource MenuSize}"
|
||||
Visibility="{Binding IsButtonVisible, ElementName=UserControl}"
|
||||
Style="{StaticResource NoBorderButtonStyle}"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Width="{StaticResource ExpandedMenuSize}"
|
||||
HorizontalContentAlignment="Left"
|
||||
Command="{Binding ActionButtonCommand, ElementName=UserControl}">
|
||||
<StackPanel Orientation="Horizontal" Margin="17,0,5,0">
|
||||
<SymbolIcon Symbol="Add">
|
||||
<ToolTipService.ToolTip>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
|
||||
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
|
||||
@@ -124,16 +125,23 @@ namespace ModernKeePass.Views.UserControls
|
||||
typeof(HamburgerMenuUserControl),
|
||||
new PropertyMetadata(false, (o, args) => { }));
|
||||
|
||||
public RelayCommand ActionButtonCommand
|
||||
{
|
||||
get { return (RelayCommand)GetValue(ActionButtonCommandProperty); }
|
||||
set { SetValue(ActionButtonCommandProperty, value); }
|
||||
}
|
||||
public static readonly DependencyProperty ActionButtonCommandProperty =
|
||||
DependencyProperty.Register(
|
||||
nameof(ActionButtonCommand),
|
||||
typeof(RelayCommand),
|
||||
typeof(HamburgerMenuUserControl),
|
||||
new PropertyMetadata(null, (o, args) => { }));
|
||||
|
||||
|
||||
public event EventHandler<SelectionChangedEventArgs> SelectionChanged;
|
||||
private void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
SelectionChanged?.Invoke(sender, e);
|
||||
}
|
||||
|
||||
public event EventHandler<RoutedEventArgs> ButtonClicked;
|
||||
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ButtonClicked?.Invoke(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user