mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
WIP Top Menu
This commit is contained in:
@@ -239,6 +239,9 @@
|
|||||||
<Compile Include="Views\UserControls\SymbolPickerUserControl.xaml.cs">
|
<Compile Include="Views\UserControls\SymbolPickerUserControl.xaml.cs">
|
||||||
<DependentUpon>SymbolPickerUserControl.xaml</DependentUpon>
|
<DependentUpon>SymbolPickerUserControl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Views\UserControls\TopMenuUserControl.xaml.cs">
|
||||||
|
<DependentUpon>TopMenuUserControl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AppxManifest Include="Package.appxmanifest">
|
<AppxManifest Include="Package.appxmanifest">
|
||||||
@@ -374,6 +377,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Views\UserControls\TopMenuUserControl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.2.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
<Reference Include="BouncyCastle.Crypto, Version=1.8.2.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
||||||
|
@@ -408,4 +408,16 @@
|
|||||||
<data name="AddEntryTooltip.Content" xml:space="preserve">
|
<data name="AddEntryTooltip.Content" xml:space="preserve">
|
||||||
<value>Create a new entry</value>
|
<value>Create a new entry</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="HamburgerMenuHomeLabel.Text" xml:space="preserve">
|
||||||
|
<value>Home</value>
|
||||||
|
</data>
|
||||||
|
<data name="HamburgerMenuHomeTooltip.Content" xml:space="preserve">
|
||||||
|
<value>Home</value>
|
||||||
|
</data>
|
||||||
|
<data name="HamburgerMenuSettingsLabel.Text" xml:space="preserve">
|
||||||
|
<value>Settings</value>
|
||||||
|
</data>
|
||||||
|
<data name="HamburgerMenuSettingsTooltip.Content" xml:space="preserve">
|
||||||
|
<value>Settings</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@@ -408,4 +408,16 @@
|
|||||||
<data name="AddEntryTooltip.Content" xml:space="preserve">
|
<data name="AddEntryTooltip.Content" xml:space="preserve">
|
||||||
<value>Créer une nouvelle entrée</value>
|
<value>Créer une nouvelle entrée</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="HamburgerMenuHomeLabel.Text" xml:space="preserve">
|
||||||
|
<value>Accueil</value>
|
||||||
|
</data>
|
||||||
|
<data name="HamburgerMenuHomeTooltip.Content" xml:space="preserve">
|
||||||
|
<value>Accueil</value>
|
||||||
|
</data>
|
||||||
|
<data name="HamburgerMenuSettingsLabel.Text" xml:space="preserve">
|
||||||
|
<value>Paramètres</value>
|
||||||
|
</data>
|
||||||
|
<data name="HamburgerMenuSettingsTooltip.Content" xml:space="preserve">
|
||||||
|
<value>Paramètres</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@@ -243,6 +243,7 @@
|
|||||||
<ColumnDefinition Width="60"/>
|
<ColumnDefinition Width="60"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Grid.Column="0"
|
<Button Grid.Column="0"
|
||||||
Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}"
|
Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}"
|
||||||
@@ -276,7 +277,8 @@
|
|||||||
</TextBox>
|
</TextBox>
|
||||||
<userControls:BreadCrumbUserControl ItemsSource="{Binding BreadCrumb}" Margin="5,-5,0,0" />
|
<userControls:BreadCrumbUserControl ItemsSource="{Binding BreadCrumb}" Margin="5,-5,0,0" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Button Grid.Column="2" x:Name="SearchButton" Style="{StaticResource NoBorderButtonStyle}" Height="50">
|
<userControls:TopMenuUserControl x:Name="TopMenu" Grid.Column="2" ShowRestoreButton="{Binding ShowRestore}" />
|
||||||
|
<Button Grid.Column="3" x:Name="SearchButton" Style="{StaticResource NoBorderButtonStyle}" Height="50">
|
||||||
<SymbolIcon Symbol="Find" />
|
<SymbolIcon Symbol="Find" />
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
<Flyout>
|
<Flyout>
|
||||||
@@ -285,13 +287,11 @@
|
|||||||
<Setter Property="Padding" Value="0" />
|
<Setter Property="Padding" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
</Flyout.FlyoutPresenterStyle>
|
</Flyout.FlyoutPresenterStyle>
|
||||||
<!--<controls:TextBoxWithButton x:Uid="GroupFilter" ButtonSymbol="" Text="{Binding Filter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="18" VerticalContentAlignment="Center" Width="400" Style="{StaticResource TextBoxWithButtonStyle}" SelectionHighlightColor="{StaticResource MainColor}" IsButtonEnabled="False" />-->
|
|
||||||
<SearchBox x:Uid="GroupSearch" Width="350" Padding="12" Background="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" BorderThickness="0" FontSize="18" SuggestionsRequested="SearchBox_OnSuggestionsRequested" SearchHistoryEnabled="False" ResultSuggestionChosen="SearchBox_OnResultSuggestionChosen" Style="{StaticResource MainColorSearchBox}" />
|
<SearchBox x:Uid="GroupSearch" Width="350" Padding="12" Background="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" BorderThickness="0" FontSize="18" SuggestionsRequested="SearchBox_OnSuggestionsRequested" SearchHistoryEnabled="False" ResultSuggestionChosen="SearchBox_OnResultSuggestionChosen" Style="{StaticResource MainColorSearchBox}" />
|
||||||
</Flyout>
|
</Flyout>
|
||||||
</Button.Flyout>
|
</Button.Flyout>
|
||||||
</Button>
|
</Button>
|
||||||
<!--<controls:TextBoxWithButton Grid.Column="2" x:Name="FilterBox" x:Uid="GroupFilter" ButtonSymbol="" Text="{Binding Filter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="18" VerticalContentAlignment="Center" Width="400" Style="{StaticResource TextBoxWithButtonStyle}" SelectionHighlightColor="{StaticResource MainColor}" IsButtonEnabled="False" />-->
|
<SearchBox Grid.Column="3" x:Uid="GroupSearch" x:Name="SearchBox" Padding="12" Width="350" Background="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" BorderThickness="0" FontSize="18" SuggestionsRequested="SearchBox_OnSuggestionsRequested" SearchHistoryEnabled="False" ResultSuggestionChosen="SearchBox_OnResultSuggestionChosen" Style="{StaticResource MainColorSearchBox}" />
|
||||||
<SearchBox Grid.Column="2" x:Uid="GroupSearch" x:Name="SearchBox" Padding="12" Width="350" Background="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" BorderThickness="0" FontSize="18" SuggestionsRequested="SearchBox_OnSuggestionsRequested" SearchHistoryEnabled="False" ResultSuggestionChosen="SearchBox_OnResultSuggestionChosen" Style="{StaticResource MainColorSearchBox}" />
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
<VisualStateGroup x:Name="DragDropGroup">
|
<VisualStateGroup x:Name="DragDropGroup">
|
||||||
@@ -310,9 +310,12 @@
|
|||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
</VisualStateGroup>
|
</VisualStateGroup>
|
||||||
<VisualStateGroup x:Name="SearchGroup">
|
<VisualStateGroup x:Name="TopMenuGroup">
|
||||||
<VisualState x:Name="Small">
|
<VisualState x:Name="Small">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMenu" Storyboard.TargetProperty="VisualState">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Small"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchButton" Storyboard.TargetProperty="Visibility">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchButton" Storyboard.TargetProperty="Visibility">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
@@ -326,6 +329,9 @@
|
|||||||
</VisualState>
|
</VisualState>
|
||||||
<VisualState x:Name="Large">
|
<VisualState x:Name="Large">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMenu" Storyboard.TargetProperty="VisualState">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Large"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchButton" Storyboard.TargetProperty="Visibility">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchButton" Storyboard.TargetProperty="Visibility">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
@@ -69,9 +69,9 @@
|
|||||||
</ListView.HeaderTemplate>
|
</ListView.HeaderTemplate>
|
||||||
<ListView.FooterTemplate>
|
<ListView.FooterTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Vertical" Visibility="{Binding IsButtonVisible, ElementName=UserControl}">
|
<StackPanel Orientation="Vertical">
|
||||||
<Border BorderBrush="White" BorderThickness="0,0,0,1" />
|
<Border BorderBrush="White" BorderThickness="0,0,0,1" />
|
||||||
<Button Padding="0" Height="50" Margin="0" Style="{StaticResource NoBorderButtonStyle}" Background="Transparent" BorderThickness="0" Click="ButtonBase_OnClick">
|
<Button Padding="0" Height="50" Margin="0" Visibility="{Binding IsButtonVisible, ElementName=UserControl}" Style="{StaticResource NoBorderButtonStyle}" Background="Transparent" BorderThickness="0" Click="ButtonBase_OnClick">
|
||||||
<StackPanel Orientation="Horizontal" Margin="13,0,5,0">
|
<StackPanel Orientation="Horizontal" Margin="13,0,5,0">
|
||||||
<SymbolIcon Symbol="Add">
|
<SymbolIcon Symbol="Add">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
@@ -81,6 +81,36 @@
|
|||||||
<TextBlock Text="{Binding ButtonLabel, ElementName=UserControl}" FontWeight="SemiBold" TextWrapping="NoWrap" FontSize="16" VerticalAlignment="Center" Margin="30,0,20,0" />
|
<TextBlock Text="{Binding ButtonLabel, ElementName=UserControl}" FontWeight="SemiBold" TextWrapping="NoWrap" FontSize="16" VerticalAlignment="Center" Margin="30,0,20,0" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button Padding="0" Height="50" Margin="0" Style="{StaticResource NoBorderButtonStyle}" Background="Transparent" BorderThickness="0">
|
||||||
|
<StackPanel Orientation="Horizontal" Margin="13,0,5,0">
|
||||||
|
<SymbolIcon Symbol="Home">
|
||||||
|
<ToolTipService.ToolTip>
|
||||||
|
<ToolTip x:Uid="HamburgerMenuHomeTooltip" />
|
||||||
|
</ToolTipService.ToolTip>
|
||||||
|
</SymbolIcon>
|
||||||
|
<TextBlock x:Uid="HamburgerMenuHomeLabel" FontWeight="SemiBold" TextWrapping="NoWrap" FontSize="16" VerticalAlignment="Center" Margin="30,0,20,0" />
|
||||||
|
</StackPanel>
|
||||||
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<core:EventTriggerBehavior EventName="Click">
|
||||||
|
<core:NavigateToPageAction TargetPage="ModernKeePass.Views.MainPage" />
|
||||||
|
</core:EventTriggerBehavior>
|
||||||
|
</interactivity:Interaction.Behaviors>
|
||||||
|
</Button>
|
||||||
|
<Button Padding="0" Height="50" Margin="0" Style="{StaticResource NoBorderButtonStyle}" Background="Transparent" BorderThickness="0">
|
||||||
|
<StackPanel Orientation="Horizontal" Margin="13,0,5,0">
|
||||||
|
<SymbolIcon Symbol="Setting">
|
||||||
|
<ToolTipService.ToolTip>
|
||||||
|
<ToolTip x:Uid="HamburgerMenuSettingsTooltip" />
|
||||||
|
</ToolTipService.ToolTip>
|
||||||
|
</SymbolIcon>
|
||||||
|
<TextBlock x:Uid="HamburgerMenuSettingsLabel" FontWeight="SemiBold" TextWrapping="NoWrap" FontSize="16" VerticalAlignment="Center" Margin="30,0,20,0" />
|
||||||
|
</StackPanel>
|
||||||
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<core:EventTriggerBehavior EventName="Click">
|
||||||
|
<core:NavigateToPageAction TargetPage="ModernKeePass.Views.SettingsPage" />
|
||||||
|
</core:EventTriggerBehavior>
|
||||||
|
</interactivity:Interaction.Behaviors>
|
||||||
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.FooterTemplate>
|
</ListView.FooterTemplate>
|
||||||
|
79
ModernKeePass/Views/UserControls/TopMenuUserControl.xaml
Normal file
79
ModernKeePass/Views/UserControls/TopMenuUserControl.xaml
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
<UserControl x:Name="UserControl"
|
||||||
|
x:Class="ModernKeePass.Views.UserControls.TopMenuUserControl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:converters="using:ModernKeePass.Converters"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||||
|
</UserControl.Resources>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Button x:Name="RestoreButton" x:Uid="TopMenuRestoreButton" Command="{Binding RestoreCommand, ElementName=UserControl}" Visibility="{Binding ShowRestoreButton, ElementName=UserControl, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource NoBorderButtonStyle}" Height="50">
|
||||||
|
<SymbolIcon Symbol="Undo" />
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="SaveButton" x:Uid="TopMenuSaveButton" Command="{Binding SaveCommand, ElementName=UserControl}" Style="{StaticResource NoBorderButtonStyle}" Height="50">
|
||||||
|
<SymbolIcon Symbol="Save" />
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="EditButton" x:Uid="TopMenuEditButton" Command="{Binding EditCommand, ElementName=UserControl}" Style="{StaticResource NoBorderButtonStyle}" Height="50">
|
||||||
|
<SymbolIcon Symbol="Edit" />
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="DeleteButton" x:Uid="TopMenuDeleteButton" Command="{Binding DeleteCommand, ElementName=UserControl}" Style="{StaticResource NoBorderButtonStyle}" Height="50">
|
||||||
|
<SymbolIcon Symbol="Delete" />
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="MoreButton" x:Uid="TopMenuMoreButton" Command="{Binding SaveCommand, ElementName=UserControl}" Style="{StaticResource NoBorderButtonStyle}" Height="50">
|
||||||
|
<SymbolIcon Symbol="More" />
|
||||||
|
<Button.Flyout>
|
||||||
|
<MenuFlyout>
|
||||||
|
<MenuFlyoutItem x:Uid="TopMenuRestoreButton" Command="{Binding RestoreCommand, ElementName=UserControl}" Visibility="{Binding ShowRestoreButton, ElementName=UserControl, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||||
|
<MenuFlyoutItem x:Uid="TopMenuSaveButton" Command="{Binding SaveCommand, ElementName=UserControl}"/>
|
||||||
|
<MenuFlyoutItem x:Uid="TopMenuEditButton" Command="{Binding EditCommand, ElementName=UserControl}" />
|
||||||
|
<MenuFlyoutItem x:Uid="TopMenuDeleteButton" Command="{Binding DeleteCommand, ElementName=UserControl}" />
|
||||||
|
</MenuFlyout>
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
<VisualStateManager.VisualStateGroups>
|
||||||
|
<VisualStateGroup x:Name="MinimizeMenuGroup">
|
||||||
|
<VisualState x:Name="Small">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SaveButton" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditButton" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RestoreButton" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="DeleteButton" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Large">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SaveButton" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditButton" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RestoreButton" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="DeleteButton" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
</VisualStateGroup>
|
||||||
|
</VisualStateManager.VisualStateGroups>
|
||||||
|
</StackPanel>
|
||||||
|
</UserControl>
|
92
ModernKeePass/Views/UserControls/TopMenuUserControl.xaml.cs
Normal file
92
ModernKeePass/Views/UserControls/TopMenuUserControl.xaml.cs
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
using System.Windows.Input;
|
||||||
|
using Windows.UI.Xaml;
|
||||||
|
|
||||||
|
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
|
||||||
|
|
||||||
|
namespace ModernKeePass.Views.UserControls
|
||||||
|
{
|
||||||
|
public sealed partial class TopMenuUserControl
|
||||||
|
{
|
||||||
|
public string VisualState
|
||||||
|
{
|
||||||
|
get { return (string)GetValue(VisualStateProperty); }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetValue(VisualStateProperty, value);
|
||||||
|
VisualStateManager.GoToState(this, value, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static readonly DependencyProperty VisualStateProperty =
|
||||||
|
DependencyProperty.Register(
|
||||||
|
"VisualState",
|
||||||
|
typeof(string),
|
||||||
|
typeof(TopMenuUserControl),
|
||||||
|
new PropertyMetadata("Large", (o, args) => { }));
|
||||||
|
|
||||||
|
public ICommand SaveCommand
|
||||||
|
{
|
||||||
|
get { return (ICommand)GetValue(SaveCommandProperty); }
|
||||||
|
set { SetValue(SaveCommandProperty, value); }
|
||||||
|
}
|
||||||
|
public static readonly DependencyProperty SaveCommandProperty =
|
||||||
|
DependencyProperty.Register(
|
||||||
|
"SaveCommand",
|
||||||
|
typeof(ICommand),
|
||||||
|
typeof(TopMenuUserControl),
|
||||||
|
new PropertyMetadata(null, (o, args) => { }));
|
||||||
|
|
||||||
|
public ICommand EditCommand
|
||||||
|
{
|
||||||
|
get { return (ICommand)GetValue(EditCommandProperty); }
|
||||||
|
set { SetValue(EditCommandProperty, value); }
|
||||||
|
}
|
||||||
|
public static readonly DependencyProperty EditCommandProperty =
|
||||||
|
DependencyProperty.Register(
|
||||||
|
"EditCommand",
|
||||||
|
typeof(ICommand),
|
||||||
|
typeof(TopMenuUserControl),
|
||||||
|
new PropertyMetadata(null, (o, args) => { }));
|
||||||
|
|
||||||
|
public ICommand DeleteCommand
|
||||||
|
{
|
||||||
|
get { return (ICommand)GetValue(DeleteCommandProperty); }
|
||||||
|
set { SetValue(DeleteCommandProperty, value); }
|
||||||
|
}
|
||||||
|
public static readonly DependencyProperty DeleteCommandProperty =
|
||||||
|
DependencyProperty.Register(
|
||||||
|
"DeleteCommand",
|
||||||
|
typeof(ICommand),
|
||||||
|
typeof(TopMenuUserControl),
|
||||||
|
new PropertyMetadata(null, (o, args) => { }));
|
||||||
|
|
||||||
|
public ICommand RestoreCommand
|
||||||
|
{
|
||||||
|
get { return (ICommand)GetValue(RestoreCommandProperty); }
|
||||||
|
set { SetValue(RestoreCommandProperty, value); }
|
||||||
|
}
|
||||||
|
public static readonly DependencyProperty RestoreCommandProperty =
|
||||||
|
DependencyProperty.Register(
|
||||||
|
"RestoreCommand",
|
||||||
|
typeof(ICommand),
|
||||||
|
typeof(TopMenuUserControl),
|
||||||
|
new PropertyMetadata(null, (o, args) => { }));
|
||||||
|
|
||||||
|
public bool ShowRestoreButton
|
||||||
|
{
|
||||||
|
get { return (bool)GetValue(ShowRestoreButtonProperty); }
|
||||||
|
set { SetValue(ShowRestoreButtonProperty, value); }
|
||||||
|
}
|
||||||
|
public static readonly DependencyProperty ShowRestoreButtonProperty =
|
||||||
|
DependencyProperty.Register(
|
||||||
|
"ShowRestoreButton",
|
||||||
|
typeof(bool),
|
||||||
|
typeof(TopMenuUserControl),
|
||||||
|
new PropertyMetadata(false, (o, args) => { }));
|
||||||
|
|
||||||
|
|
||||||
|
public TopMenuUserControl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user