mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00

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
554 lines
47 KiB
XML
554 lines
47 KiB
XML
<Page
|
|
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"
|
|
xmlns:local="using:ModernKeePass.Controls"
|
|
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
|
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
|
|
xmlns:actions="using:ModernKeePass.Actions"
|
|
xmlns:userControls="using:ModernKeePass.Views.UserControls"
|
|
x:Class="ModernKeePass.Views.EntryDetailPage"
|
|
mc:Ignorable="d"
|
|
SizeChanged="EntryDetailPage_OnSizeChanged"
|
|
DataContext="{Binding Source={StaticResource Locator}, Path=Entry}">
|
|
<Page.Resources>
|
|
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
|
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter" />
|
|
<converters:ProgressBarLegalValuesConverter x:Key="ProgressBarLegalValuesConverter" />
|
|
<converters:DoubleToSolidColorBrushConverter x:Key="DoubleToForegroundBrushComplexityConverter" />
|
|
|
|
<Style TargetType="local:PasswordBoxWithButton" x:Key="PasswordBoxWithButtonStyle">
|
|
<Setter Property="Background" Value="{ThemeResource SearchBoxBackgroundThemeBrush}" />
|
|
<Setter Property="BorderBrush" Value="{ThemeResource ComboBoxBorderThemeBrush}" />
|
|
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
|
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontSize" Value="{ThemeResource SearchBoxContentThemeFontSize}" />
|
|
<Setter Property="FontWeight" Value="{ThemeResource SearchBoxContentThemeFontWeight}"/>
|
|
<Setter Property="Foreground" Value="{ThemeResource SearchBoxForegroundThemeBrush}" />
|
|
<Setter Property="Padding" Value="{ThemeResource SearchBoxThemePadding}"/>
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="Width" Value="350" />
|
|
<Setter Property="Height" Value="32" />
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="Typography.StylisticSet20" Value="True"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="local:PasswordBoxWithButton">
|
|
<Grid x:Name="SearchBoxGrid">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBoxGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBoxBorder" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ActionButton" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBoxGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxPointerOverBackgroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBoxBorder" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxPointerOverBorderThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ActionButton" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxPointerOverTextThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBoxGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxDisabledBackgroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBoxBorder" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxDisabledBorderThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ActionButton" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxDisabledTextThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PasswordBox" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Focused">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBoxGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedBackgroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBoxBorder" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource MainColor}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ActionButton" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxButtonForegroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ActionButton" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedBorderThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="FocusedDropDown">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBoxGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedBackgroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBoxBorder" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedBorderThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ActionButton" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedTextThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Grid.Resources>
|
|
<Style x:Key="ActionButtonStyle" TargetType="Button">
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Grid Background="Transparent">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal" />
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchGlyph" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxButtonPointerOverForegroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ActionButtonBackground" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxButtonPointerOverBackgroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchGlyph" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedTextThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ActionButtonBackground" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SearchBoxFocusedBackgroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled" />
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="FocusStates">
|
|
<VisualState x:Name="Focused" />
|
|
<VisualState x:Name="Unfocused" />
|
|
<VisualState x:Name="PointerFocused" />
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Grid x:Name="ActionButtonBackground" Background="{TemplateBinding Background}">
|
|
<TextBlock x:Name="SearchGlyph"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
HorizontalAlignment="Center"
|
|
FontStyle="Normal"
|
|
Padding="4,0,4,0"
|
|
Text="{TemplateBinding Content}"
|
|
VerticalAlignment="Center" />
|
|
</Grid>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="PasswordBoxStyle" TargetType="PasswordBox">
|
|
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
|
|
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
|
|
<Setter Property="Foreground" Value="{ThemeResource TextBoxForegroundThemeBrush}" />
|
|
<Setter Property="Background" Value="{ThemeResource TextBoxBackgroundThemeBrush}" />
|
|
<Setter Property="BorderBrush" Value="{ThemeResource TextBoxBorderThemeBrush}" />
|
|
<Setter Property="SelectionHighlightColor" Value="{ThemeResource TextSelectionHighlightColorThemeBrush}" />
|
|
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
|
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
|
|
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
|
|
<Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="PasswordBox">
|
|
<Grid>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
|
Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
|
Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledBorderThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement"
|
|
Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledForegroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter"
|
|
Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledForegroundThemeBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Normal">
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
|
Storyboard.TargetProperty="Opacity"
|
|
Duration="0"
|
|
To="{ThemeResource TextControlBackgroundThemeOpacity}" />
|
|
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
|
Storyboard.TargetProperty="Opacity"
|
|
Duration="0"
|
|
To="{ThemeResource TextControlBorderThemeOpacity}" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
|
Storyboard.TargetProperty="Opacity"
|
|
Duration="0"
|
|
To="{ThemeResource TextControlPointerOverBackgroundThemeOpacity}" />
|
|
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
|
Storyboard.TargetProperty="Opacity"
|
|
Duration="0"
|
|
To="{ThemeResource TextControlPointerOverBorderThemeOpacity}" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Focused" />
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="ButtonStates" />
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Border x:Name="BackgroundElement"
|
|
Grid.Row="1"
|
|
Background="{TemplateBinding Background}"
|
|
Margin="{TemplateBinding BorderThickness}" />
|
|
<Border x:Name="BorderElement"
|
|
Grid.Row="1"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}" />
|
|
<ContentPresenter x:Name="HeaderContentPresenter"
|
|
Grid.Row="0"
|
|
Foreground="{ThemeResource TextBoxForegroundHeaderThemeBrush}"
|
|
Margin="0,4,0,4"
|
|
Content="{TemplateBinding Header}"
|
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
|
FontWeight="Semilight" />
|
|
<ScrollViewer x:Name="ContentElement"
|
|
Grid.Row="1"
|
|
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
|
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
|
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
|
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
|
|
IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
|
|
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
|
|
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
IsTabStop="False"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
ZoomMode="Disabled" />
|
|
<ContentControl x:Name="PlaceholderTextContentPresenter"
|
|
Grid.Row="1"
|
|
Foreground="{ThemeResource TextBoxPlaceholderTextThemeBrush}"
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
IsTabStop="False"
|
|
Grid.ColumnSpan="2"
|
|
Content="{TemplateBinding PlaceholderText}"
|
|
IsHitTestVisible="False" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Grid.Resources>
|
|
<Border x:Name="SearchBoxBorder"
|
|
Background="Transparent"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<PasswordBox x:Name="PasswordBox"
|
|
BorderThickness="0"
|
|
Background="Transparent"
|
|
FontFamily="{TemplateBinding FontFamily}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
FontWeight="{TemplateBinding FontWeight}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
MaxLength="2048"
|
|
MinHeight="{ThemeResource SearchBoxTextBoxThemeMinHeight}"
|
|
Padding="{TemplateBinding Padding}"
|
|
PlaceholderText="{TemplateBinding PlaceholderText}"
|
|
Style="{StaticResource PasswordBoxStyle}"
|
|
VerticalAlignment="Stretch"
|
|
Margin="0"
|
|
Password="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=Password}"
|
|
IsPasswordRevealButtonEnabled="{TemplateBinding IsPasswordRevealEnabled}"/>
|
|
<Button x:Name="ActionButton"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Background="Transparent"
|
|
FontWeight="{ThemeResource SearchBoxButtonThemeFontWeight}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
Grid.Column="1"
|
|
Style="{StaticResource ActionButtonStyle}"
|
|
Content="{TemplateBinding ButtonSymbol}"
|
|
IsEnabled="{TemplateBinding IsButtonEnabled}">
|
|
<Button.Flyout>
|
|
<Flyout>
|
|
<interactivity:Interaction.Behaviors>
|
|
<core:DataTriggerBehavior Binding="{Binding Password}" ComparisonCondition="NotEqual" Value="" >
|
|
<!--<actions:CloseFlyoutAction />-->
|
|
<core:CallMethodAction MethodName="Hide" />
|
|
</core:DataTriggerBehavior>
|
|
</interactivity:Interaction.Behaviors>
|
|
<StackPanel>
|
|
<TextBlock>
|
|
<Run x:Uid="PasswordGeneratorLength" />
|
|
<Run Text="{Binding PasswordLength}" />
|
|
</TextBlock>
|
|
<Slider Value="{Binding PasswordLength, Mode=TwoWay}" Margin="0,-10,0,-20" />
|
|
<CheckBox IsChecked="{Binding UpperCasePatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorUpper" />
|
|
<CheckBox IsChecked="{Binding LowerCasePatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorLower" />
|
|
<CheckBox IsChecked="{Binding DigitsPatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorDigits" />
|
|
<CheckBox IsChecked="{Binding MinusPatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorMinus" />
|
|
<CheckBox IsChecked="{Binding UnderscorePatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorUnderscore" />
|
|
<CheckBox IsChecked="{Binding SpacePatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorSpace" />
|
|
<CheckBox IsChecked="{Binding SpecialPatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorSpecial" />
|
|
<CheckBox IsChecked="{Binding BracketsPatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorBrackets" />
|
|
<TextBlock x:Uid="PasswordGeneratorAlso" Margin="0,5,0,0"/>
|
|
<TextBox Text="{Binding CustomChars, Mode=TwoWay}" />
|
|
<Button x:Uid="PasswordGeneratorButton" Command="{Binding GeneratePasswordCommand}" />
|
|
</StackPanel>
|
|
</Flyout>
|
|
</Button.Flyout>
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip x:Uid="PasswordGeneratorTooltip" />
|
|
</ToolTipService.ToolTip>
|
|
</Button>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</Page.Resources>
|
|
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
|
<Grid.ChildrenTransitions>
|
|
<TransitionCollection>
|
|
<EntranceThemeTransition/>
|
|
</TransitionCollection>
|
|
</Grid.ChildrenTransitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="{StaticResource MenuHeightGridLength}"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<userControls:HamburgerMenuUserControl
|
|
x:Name="HamburgerMenu"
|
|
x:Uid="HistoryLeftListView"
|
|
ItemsSource="{Binding History}"
|
|
SelectedIndex="{Binding SelectedIndex, Mode=TwoWay}"
|
|
SelectedItem="{Binding SelectedItem, Mode=TwoWay}" />
|
|
<Grid Grid.Column="1">
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<StackPanel Margin="20,0,0,20">
|
|
<StackPanel.Resources>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="Margin" Value="0,20,0,0"/>
|
|
<Setter Property="FontSize" Value="18"/>
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
</Style>
|
|
<Style TargetType="CheckBox">
|
|
<Setter Property="Margin" Value="0,20,0,0"/>
|
|
<Setter Property="FontSize" Value="18"/>
|
|
</Style>
|
|
</StackPanel.Resources>
|
|
<TextBlock x:Uid="EntryLogin" />
|
|
<local:TextBoxWithButton x:Uid="LoginTextBox" Text="{Binding UserName, Mode=TwoWay}" Style="{StaticResource TextBoxWithButtonStyle}" ButtonSymbol="" IsEnabled="{Binding IsCurrentEntry}">
|
|
<interactivity:Interaction.Behaviors>
|
|
<core:EventTriggerBehavior EventName="ButtonClick">
|
|
<actions:ClipboardAction Text="{Binding UserName}" />
|
|
<actions:ToastAction x:Uid="ToastCopyLogin" Title="{Binding Title}" />
|
|
</core:EventTriggerBehavior>
|
|
</interactivity:Interaction.Behaviors>
|
|
</local:TextBoxWithButton>
|
|
<TextBlock x:Uid="EntryPassword" />
|
|
<local:PasswordBoxWithButton Password="{Binding Password, Mode=TwoWay}" IsPasswordRevealEnabled="True" Visibility="{Binding IsRevealPassword, Converter={StaticResource InverseBooleanToVisibilityConverter}}" Style="{StaticResource PasswordBoxWithButtonStyle}" IsEnabled="{Binding IsCurrentEntry}" ButtonSymbol="" />
|
|
<local:TextBoxWithButton x:Uid="PasswordTextBox" Text="{Binding Password, Mode=TwoWay}" Visibility="{Binding IsRevealPassword, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource TextBoxWithButtonStyle}" ButtonSymbol="" IsEnabled="{Binding IsCurrentEntry}">
|
|
<interactivity:Interaction.Behaviors>
|
|
<core:EventTriggerBehavior EventName="ButtonClick">
|
|
<actions:ClipboardAction Text="{Binding Password}" />
|
|
<actions:ToastAction x:Uid="ToastCopyPassword" Title="{Binding Title}" />
|
|
</core:EventTriggerBehavior>
|
|
</interactivity:Interaction.Behaviors>
|
|
</local:TextBoxWithButton>
|
|
<ProgressBar Value="{Binding PasswordComplexityIndicator, ConverterParameter=0\,128, Converter={StaticResource ProgressBarLegalValuesConverter}}" Maximum="128" Width="350" HorizontalAlignment="Left" Foreground="{Binding PasswordComplexityIndicator, ConverterParameter=128, Converter={StaticResource DoubleToForegroundBrushComplexityConverter}}" />
|
|
<CheckBox x:Uid="EntryShowPassword" HorizontalAlignment="Left" Margin="-3,0,0,0" IsChecked="{Binding IsRevealPassword, Mode=TwoWay}" IsEnabled="{Binding IsRevealPasswordEnabled}" />
|
|
<TextBlock TextWrapping="Wrap" Text="URL" FontSize="18"/>
|
|
<local:TextBoxWithButton x:Uid="UrlTextBox" Text="{Binding Url, Mode=TwoWay}" Style="{StaticResource TextBoxWithButtonStyle}" ButtonSymbol="" IsEnabled="{Binding IsCurrentEntry}">
|
|
<interactivity:Interaction.Behaviors>
|
|
<core:EventTriggerBehavior EventName="ButtonClick">
|
|
<actions:NavigateToUrlAction Url="{Binding Url}" />
|
|
</core:EventTriggerBehavior>
|
|
</interactivity:Interaction.Behaviors>
|
|
</local:TextBoxWithButton>
|
|
<TextBlock x:Uid="EntryNotes" />
|
|
<TextBox HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Notes, Mode=TwoWay}" Width="350" Height="200" AcceptsReturn="True" IsSpellCheckEnabled="True" IsEnabled="{Binding IsCurrentEntry}" />
|
|
<CheckBox x:Uid="EntryExpirationDate" IsChecked="{Binding HasExpirationDate, Mode=TwoWay}" IsEnabled="{Binding IsCurrentEntry}" />
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<SymbolIcon Grid.Column="0" Symbol="Important" Foreground="DarkRed" Visibility="{Binding HasExpired, Converter={StaticResource BooleanToVisibilityConverter}}">
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip x:Uid="EntryExpirationTooltip" />
|
|
</ToolTipService.ToolTip>
|
|
</SymbolIcon>
|
|
<StackPanel Grid.Column="1" x:Name="ExpirationDatePanel" Orientation="Horizontal" Visibility="{Binding HasExpirationDate, Converter={StaticResource BooleanToVisibilityConverter}}">
|
|
<DatePicker Margin="0,0,20,0" Date="{Binding ExpiryDate, Mode=TwoWay}" />
|
|
<TimePicker Time="{Binding ExpiryTime, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<StackPanel x:Name="EditDesign" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}" Orientation="Horizontal">
|
|
<StackPanel Width="250" HorizontalAlignment="Left">
|
|
<TextBlock x:Uid="EntryBackgroundColor" />
|
|
<userControls:ColorPickerUserControl SelectedColor="{Binding BackgroundColor, Mode=TwoWay}" IsEnabled="{Binding IsCurrentEntry}" />
|
|
</StackPanel>
|
|
<StackPanel Width="250" HorizontalAlignment="Left">
|
|
<TextBlock x:Uid="EntryForegroundColor" />
|
|
<userControls:ColorPickerUserControl SelectedColor="{Binding ForegroundColor, Mode=TwoWay}" IsEnabled="{Binding IsCurrentEntry}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Grid>
|
|
<!-- Bouton Précédent et titre de la page -->
|
|
<Grid Grid.Row="0" Background="{ThemeResource AppBarBackgroundThemeBrush}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="{StaticResource MenuWidthGridLength}"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Button Grid.Column="0"
|
|
Command="{Binding GoBackCommand}"
|
|
Height="{StaticResource MenuHeight}"
|
|
Width="{StaticResource MenuWidth}"
|
|
AutomationProperties.Name="Back"
|
|
AutomationProperties.AutomationId="BackButton"
|
|
AutomationProperties.ItemType="Navigation Button"
|
|
Style="{StaticResource NoBorderButtonStyle}">
|
|
<SymbolIcon Symbol="Back" />
|
|
</Button>
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
|
<Button
|
|
Height="{StaticResource MenuHeight}"
|
|
Width="{StaticResource MenuWidth}"
|
|
Command="{Binding GoToParentCommand}"
|
|
Style="{StaticResource NoBorderButtonStyle}">
|
|
<SymbolIcon Symbol="Up" />
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip Content="{Binding ParentGroupName}" />
|
|
</ToolTipService.ToolTip>
|
|
</Button>
|
|
<Viewbox MaxHeight="200" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}">
|
|
<userControls:SymbolPickerUserControl Width="100" Height="70" SelectedSymbol="{Binding Icon, Mode=TwoWay}" />
|
|
</Viewbox>
|
|
<Viewbox MaxHeight="200" Visibility="{Binding IsEditMode, Converter={StaticResource InverseBooleanToVisibilityConverter}}">
|
|
<SymbolIcon Symbol="{Binding Icon}" Width="100" Height="70" />
|
|
</Viewbox>
|
|
<TextBox
|
|
x:Uid="EntryTitle"
|
|
x:Name="TitleTextBox"
|
|
Text="{Binding Title, Mode=TwoWay}"
|
|
Background="Transparent"
|
|
IsHitTestVisible="{Binding IsEditMode}"
|
|
FontSize="20"
|
|
FontWeight="Light"
|
|
TextWrapping="NoWrap"
|
|
MinWidth="360"
|
|
VerticalAlignment="Center">
|
|
<interactivity:Interaction.Behaviors>
|
|
<core:DataTriggerBehavior Binding="{Binding IsEditMode}" Value="True">
|
|
<actions:SetupFocusAction TargetObject="{Binding ElementName=TitleTextBox}" />
|
|
<core:ChangePropertyAction TargetObject="{Binding ElementName=TitleTextBox}" PropertyName="BorderThickness" Value="2" />
|
|
</core:DataTriggerBehavior>
|
|
<core:DataTriggerBehavior Binding="{Binding IsEditMode}" Value="False">
|
|
<core:ChangePropertyAction TargetObject="{Binding ElementName=TitleTextBox}" PropertyName="BorderThickness" Value="0" />
|
|
</core:DataTriggerBehavior>
|
|
</interactivity:Interaction.Behaviors>
|
|
</TextBox>
|
|
</StackPanel>
|
|
<userControls:TopMenuUserControl
|
|
x:Name="TopMenu" Grid.Column="2"
|
|
IsEditButtonChecked="{Binding IsEditMode, Mode=TwoWay}"
|
|
MoveButtonVisibility="{Binding IsCurrentEntry, Converter={StaticResource BooleanToVisibilityConverter}}"
|
|
RestoreButtonVisibility="{Binding IsCurrentEntry, Converter={StaticResource InverseBooleanToVisibilityConverter}}"
|
|
SaveCommand="{Binding SaveCommand}"
|
|
MoveCommand="{Binding MoveCommand}"
|
|
RestoreCommand="{Binding RestoreCommand}"
|
|
DeleteCommand="{Binding DeleteCommand}">
|
|
<interactivity:Interaction.Behaviors>
|
|
<core:EventTriggerBehavior EventName="EditButtonClick">
|
|
<actions:SetupFocusAction TargetObject="{Binding ElementName=TitleTextBox}" />
|
|
</core:EventTriggerBehavior>
|
|
</interactivity:Interaction.Behaviors>
|
|
</userControls:TopMenuUserControl>
|
|
</Grid>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup>
|
|
<VisualState x:Name="Small">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpirationDatePanel" Storyboard.TargetProperty="Orientation">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Vertical"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditDesign" Storyboard.TargetProperty="Orientation">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Vertical"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Large">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpirationDatePanel" Storyboard.TargetProperty="Orientation">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Horizontal"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditDesign" Storyboard.TargetProperty="Orientation">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Horizontal"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
</Page> |