2017-09-17 10:00:03 -04:00
|
|
|
<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"
|
2017-10-12 17:30:29 +02:00
|
|
|
xmlns:viewModels="using:ModernKeePass.ViewModels"
|
|
|
|
xmlns:converters="using:ModernKeePass.Converters"
|
|
|
|
xmlns:local="using:ModernKeePass.Controls"
|
2017-10-19 17:23:56 +02:00
|
|
|
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity" xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
|
|
|
|
xmlns:Actions="using:ModernKeePass.Actions"
|
2017-10-12 17:30:29 +02:00
|
|
|
x:Name="PageRoot"
|
2017-09-17 10:00:03 -04:00
|
|
|
x:Class="ModernKeePass.Pages.EntryDetailPage"
|
|
|
|
mc:Ignorable="d">
|
|
|
|
|
2017-10-06 17:57:36 +02:00
|
|
|
<Page.Resources>
|
2017-10-12 17:30:29 +02:00
|
|
|
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
|
|
|
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter"/>
|
2017-10-19 16:33:07 +02:00
|
|
|
<converters:ProgressBarLegalValuesConverter x:Key="ProgressBarLegalValuesConverter"/>
|
|
|
|
<converters:DoubleToForegroungBrushComplexityConverter x:Key="DoubleToForegroungBrushComplexityConverter"/>
|
2017-10-16 18:31:45 +02:00
|
|
|
<Style TargetType="PasswordBox" x:Name="PasswordBoxWithButtonStyle">
|
|
|
|
<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="SelectionHighlightColor" Value="{ThemeResource TextSelectionHighlightColorThemeBrush}" />
|
|
|
|
<Setter Property="BorderBrush" Value="{ThemeResource TextBoxBorderThemeBrush}" />
|
|
|
|
<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="Padding" Value="{ThemeResource TextControlThemePadding}"/>
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate TargetType="PasswordBox">
|
|
|
|
<Grid>
|
|
|
|
<Grid.Resources>
|
|
|
|
<Style x:Name="RevealButtonStyle" TargetType="Button">
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
|
<Grid>
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
|
|
<VisualState x:Name="Normal" />
|
|
|
|
<VisualState x:Name="PointerOver">
|
|
|
|
<Storyboard>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
|
|
|
Storyboard.TargetProperty="BorderBrush">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverBorderThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
|
|
|
Storyboard.TargetProperty="Foreground">
|
2017-10-17 18:46:05 +02:00
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverBackgroundThemeBrush}" />
|
2017-10-16 18:31:45 +02:00
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
</Storyboard>
|
|
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Pressed">
|
|
|
|
<Storyboard>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
|
|
|
Storyboard.TargetProperty="BorderBrush">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBorderThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
|
|
|
Storyboard.TargetProperty="Foreground">
|
2017-10-17 18:46:05 +02:00
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverForegroundThemeBrush}" />
|
2017-10-16 18:31:45 +02:00
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
</Storyboard>
|
|
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Disabled">
|
|
|
|
<Storyboard>
|
|
|
|
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
|
|
|
Storyboard.TargetProperty="Opacity"
|
|
|
|
To="0"
|
|
|
|
Duration="0" />
|
|
|
|
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
|
|
|
Storyboard.TargetProperty="Opacity"
|
|
|
|
To="0"
|
|
|
|
Duration="0" />
|
|
|
|
</Storyboard>
|
|
|
|
</VisualState>
|
|
|
|
</VisualStateGroup>
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<Border x:Name="BorderElement"
|
|
|
|
BorderBrush="{ThemeResource TextBoxButtonBorderThemeBrush}"
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"/>
|
|
|
|
<Border x:Name="BackgroundElement"
|
|
|
|
Background="{ThemeResource TextBoxButtonBackgroundThemeBrush}"
|
|
|
|
Margin="{TemplateBinding BorderThickness}">
|
|
|
|
<TextBlock x:Name="GlyphElement"
|
|
|
|
Foreground="{ThemeResource TextBoxButtonForegroundThemeBrush}"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
FontStyle="Normal"
|
|
|
|
Text=""
|
|
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
|
|
|
AutomationProperties.AccessibilityView="Raw"/>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style x:Name="GeneratorButtonStyle" TargetType="Button">
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
|
<Grid>
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
|
|
<VisualState x:Name="Normal" >
|
|
|
|
<Storyboard>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
|
|
|
Storyboard.TargetProperty="Background">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBackgroundThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
|
|
|
Storyboard.TargetProperty="BorderBrush">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBorderThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
|
|
|
Storyboard.TargetProperty="Foreground">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedForegroundThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
</Storyboard>
|
|
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="PointerOver">
|
|
|
|
<Storyboard>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
|
|
|
Storyboard.TargetProperty="Background">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverBackgroundThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
|
|
|
Storyboard.TargetProperty="BorderBrush">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverBorderThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
|
|
|
Storyboard.TargetProperty="Foreground">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverForegroundThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
</Storyboard>
|
|
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Pressed">
|
|
|
|
<Storyboard>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
|
|
|
Storyboard.TargetProperty="Background">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBackgroundThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
|
|
|
Storyboard.TargetProperty="BorderBrush">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBorderThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
|
|
|
Storyboard.TargetProperty="Foreground">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedForegroundThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
</Storyboard>
|
|
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Disabled">
|
|
|
|
<Storyboard>
|
|
|
|
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
|
|
|
Storyboard.TargetProperty="Opacity"
|
|
|
|
To="0"
|
|
|
|
Duration="0" />
|
|
|
|
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
|
|
|
Storyboard.TargetProperty="Opacity"
|
|
|
|
To="0"
|
|
|
|
Duration="0" />
|
|
|
|
</Storyboard>
|
|
|
|
</VisualState>
|
|
|
|
</VisualStateGroup>
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<Border x:Name="BorderElement"
|
|
|
|
BorderBrush="{ThemeResource TextBoxButtonBorderThemeBrush}"
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"/>
|
|
|
|
<Border x:Name="BackgroundElement"
|
|
|
|
Background="{ThemeResource TextBoxButtonBackgroundThemeBrush}"
|
|
|
|
Margin="{TemplateBinding BorderThickness}">
|
|
|
|
<TextBlock x:Name="GlyphElement"
|
|
|
|
Foreground="{ThemeResource TextBoxButtonForegroundThemeBrush}"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
FontStyle="Normal"
|
|
|
|
Text=""
|
|
|
|
Padding="4,0,4,0"
|
|
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
|
|
|
AutomationProperties.AccessibilityView="Raw"/>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
</Grid.Resources>
|
|
|
|
<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">
|
|
|
|
<VisualState x:Name="ButtonVisible">
|
|
|
|
<Storyboard>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RevealButton"
|
|
|
|
Storyboard.TargetProperty="Visibility">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
|
|
<DiscreteObjectKeyFrame.Value>
|
|
|
|
<Visibility>Visible</Visibility>
|
|
|
|
</DiscreteObjectKeyFrame.Value>
|
|
|
|
</DiscreteObjectKeyFrame>
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
</Storyboard>
|
|
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="ButtonCollapsed" />
|
|
|
|
</VisualStateGroup>
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border x:Name="BackgroundElement"
|
|
|
|
Grid.Row="1"
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
|
|
Grid.ColumnSpan="3"
|
|
|
|
Grid.RowSpan="1"/>
|
|
|
|
<Border x:Name="BorderElement"
|
|
|
|
Grid.Row="1"
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
Grid.ColumnSpan="3"
|
|
|
|
Grid.RowSpan="1"/>
|
|
|
|
<ContentPresenter x:Name="HeaderContentPresenter"
|
|
|
|
Grid.Row="0"
|
|
|
|
Foreground="{ThemeResource TextBoxForegroundHeaderThemeBrush}"
|
|
|
|
Margin="0,4,0,4"
|
|
|
|
Grid.ColumnSpan="3"
|
|
|
|
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}"
|
|
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
|
|
Padding="{TemplateBinding Padding}"
|
|
|
|
IsTabStop="False"
|
|
|
|
ZoomMode="Disabled"
|
|
|
|
AutomationProperties.AccessibilityView="Raw"/>
|
|
|
|
<ContentControl x:Name="PlaceholderTextContentPresenter"
|
|
|
|
Grid.Row="1"
|
|
|
|
Foreground="{ThemeResource TextBoxPlaceholderTextThemeBrush}"
|
|
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
|
|
Padding="{TemplateBinding Padding}"
|
|
|
|
IsTabStop="False"
|
|
|
|
Grid.ColumnSpan="3"
|
|
|
|
Content="{TemplateBinding PlaceholderText}"
|
|
|
|
IsHitTestVisible="False"/>
|
|
|
|
<Button x:Name="RevealButton"
|
|
|
|
Grid.Row="1"
|
|
|
|
Style="{StaticResource RevealButtonStyle}"
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
IsTabStop="False"
|
|
|
|
Grid.Column="1"
|
|
|
|
Visibility="Collapsed"
|
|
|
|
FontSize="{TemplateBinding FontSize}"
|
|
|
|
VerticalAlignment="Stretch"/>
|
2017-10-19 17:23:56 +02:00
|
|
|
<Button
|
2017-10-16 18:31:45 +02:00
|
|
|
Grid.Row="1"
|
|
|
|
Style="{StaticResource GeneratorButtonStyle}"
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
IsTabStop="False"
|
|
|
|
Grid.Column="2"
|
|
|
|
Visibility="Visible"
|
|
|
|
FontSize="{TemplateBinding FontSize}"
|
|
|
|
VerticalAlignment="Stretch" >
|
|
|
|
<Button.Flyout>
|
2017-10-19 17:23:56 +02:00
|
|
|
<Flyout x:Name="GenerateButtonFlyout">
|
|
|
|
<Interactivity:Interaction.Behaviors>
|
|
|
|
<Core:DataTriggerBehavior Binding="{Binding Password}" ComparisonCondition="NotEqual" Value="" >
|
|
|
|
<Actions:CloseFlyoutAction />
|
|
|
|
</Core:DataTriggerBehavior>
|
|
|
|
</Interactivity:Interaction.Behaviors>
|
2017-10-16 18:31:45 +02:00
|
|
|
<StackPanel>
|
2017-10-19 17:23:56 +02:00
|
|
|
<TextBlock>
|
|
|
|
<Run Text="Password Length:"/>
|
|
|
|
</TextBlock>
|
2017-10-16 18:31:45 +02:00
|
|
|
<Slider Value="{Binding PasswordLength, Mode=TwoWay}" Margin="0,-10,0,-20" />
|
2017-10-19 17:23:56 +02:00
|
|
|
<CheckBox IsChecked="{Binding UpperCasePatternSelected, Mode=TwoWay}" Content="Upper case (A, B, C, ...)"/>
|
|
|
|
<CheckBox IsChecked="{Binding LowerCasePatternSelected, Mode=TwoWay}" Content="Lower case (a, b, c, ...)"/>
|
|
|
|
<CheckBox IsChecked="{Binding DigitsPatternSelected, Mode=TwoWay}" Content="Digits (0, 1, 2, ...)"/>
|
|
|
|
<CheckBox IsChecked="{Binding MinusPatternSelected, Mode=TwoWay}" Content="Minus (-)"/>
|
|
|
|
<CheckBox IsChecked="{Binding UnderscorePatternSelected, Mode=TwoWay}" Content="Underscore (_)"/>
|
|
|
|
<CheckBox IsChecked="{Binding SpacePatternSelected, Mode=TwoWay}" Content="Space ( )"/>
|
|
|
|
<CheckBox IsChecked="{Binding SpecialPatternSelected, Mode=TwoWay}" Content="Special (!, $, %, ...)"/>
|
|
|
|
<CheckBox IsChecked="{Binding BracketsPatternSelected, Mode=TwoWay}" Content="Brackets ([], {}, (), ...)"/>
|
|
|
|
<Button Click="PasswordGenerationButton_Click" Content="Generate"/>
|
2017-10-16 18:31:45 +02:00
|
|
|
</StackPanel>
|
2017-10-19 17:23:56 +02:00
|
|
|
|
2017-10-16 18:31:45 +02:00
|
|
|
</Flyout>
|
|
|
|
</Button.Flyout>
|
|
|
|
</Button>
|
|
|
|
</Grid>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
2017-10-06 17:57:36 +02:00
|
|
|
</Page.Resources>
|
|
|
|
|
2017-09-17 10:00:03 -04:00
|
|
|
<Page.DataContext>
|
2017-10-12 17:30:29 +02:00
|
|
|
<viewModels:EntryVm/>
|
2017-09-17 10:00:03 -04:00
|
|
|
</Page.DataContext>
|
2017-10-06 17:57:36 +02:00
|
|
|
|
2017-09-17 10:00:03 -04:00
|
|
|
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
|
|
|
<Grid.ChildrenTransitions>
|
|
|
|
<TransitionCollection>
|
|
|
|
<EntranceThemeTransition/>
|
|
|
|
</TransitionCollection>
|
|
|
|
</Grid.ChildrenTransitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="140"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
2017-09-29 18:08:20 +02:00
|
|
|
<StackPanel Grid.Row="1" Margin="20,0,0,0" >
|
|
|
|
<StackPanel.Resources>
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
<Setter Property="Margin" Value="0,20,0,0"/>
|
|
|
|
</Style>
|
2017-10-18 13:57:10 +02:00
|
|
|
<Style TargetType="CheckBox">
|
|
|
|
<Setter Property="Margin" Value="0,20,0,0"/>
|
|
|
|
</Style>
|
2017-09-29 18:08:20 +02:00
|
|
|
</StackPanel.Resources>
|
2017-10-12 18:37:49 +02:00
|
|
|
<TextBlock TextWrapping="Wrap" Text="User name or login" FontSize="18"/>
|
|
|
|
<TextBox HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding UserName, Mode=TwoWay}" Width="350" Height="32" />
|
|
|
|
<TextBlock TextWrapping="Wrap" Text="Password" FontSize="18"/>
|
2017-10-16 18:31:45 +02:00
|
|
|
<PasswordBox HorizontalAlignment="Left" Password="{Binding Password, Mode=TwoWay}" Width="350" Height="32" IsPasswordRevealButtonEnabled="True" Visibility="{Binding IsRevealPassword, Converter={StaticResource InverseBooleanToVisibilityConverter}}" Style="{StaticResource PasswordBoxWithButtonStyle}" />
|
2017-10-12 18:37:49 +02:00
|
|
|
<TextBox HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Password, Mode=TwoWay}" Width="350" Height="32" Visibility="{Binding IsRevealPassword, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
2017-10-19 16:33:07 +02:00
|
|
|
<ProgressBar Value="{Binding PasswordComplexityIndicator, ConverterParameter=0\,128, Converter={StaticResource ProgressBarLegalValuesConverter}}" Maximum="128" Width="350" HorizontalAlignment="Left" Foreground="{Binding PasswordComplexityIndicator, ConverterParameter=128, Converter={StaticResource DoubleToForegroungBrushComplexityConverter}}" />
|
2017-10-12 18:37:49 +02:00
|
|
|
<CheckBox HorizontalAlignment="Left" Margin="-3,0,0,0" Content="Show password" IsChecked="{Binding IsRevealPassword, Mode=TwoWay}" IsEnabled="{Binding IsRevealPasswordEnabled}" />
|
|
|
|
<TextBlock TextWrapping="Wrap" Text="URL" FontSize="18"/>
|
|
|
|
<local:TextBoxWithButton x:Name="UrlTextBox" HorizontalAlignment="Left" Text="{Binding Url, Mode=TwoWay}" Height="32" Width="350" MaxLength="256" Style="{StaticResource TextBoxWithButtonStyle}" GotoClick="UrlButton_Click" />
|
|
|
|
<TextBlock TextWrapping="Wrap" Text="Notes" FontSize="18"/>
|
|
|
|
<TextBox HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Notes, Mode=TwoWay}" Width="350" Height="200" AcceptsReturn="True" IsSpellCheckEnabled="True" />
|
2017-10-19 17:23:56 +02:00
|
|
|
<CheckBox FontSize="18" IsChecked="{Binding HasExpirationDate, Mode=TwoWay}" Content="Expiration date"/>
|
2017-10-18 13:57:10 +02:00
|
|
|
<StackPanel Orientation="Horizontal" IsHitTestVisible="{Binding HasExpirationDate}">
|
2017-10-18 18:49:02 +02:00
|
|
|
<SymbolIcon Symbol="Important" Foreground="DarkRed" Visibility="{Binding HasExpired, Converter={StaticResource BooleanToVisibilityConverter}}">
|
|
|
|
<ToolTipService.ToolTip>
|
|
|
|
<ToolTip Content="Password has expired" />
|
|
|
|
</ToolTipService.ToolTip>
|
|
|
|
</SymbolIcon>
|
2017-10-19 17:23:56 +02:00
|
|
|
<DatePicker Margin="0,0,20,0" Date="{Binding ExpiryDate, Mode=TwoWay}" />
|
|
|
|
<TimePicker Time="{Binding ExpiryTime, Mode=TwoWay}"/>
|
2017-10-18 13:57:10 +02:00
|
|
|
</StackPanel>
|
2017-09-29 18:08:20 +02:00
|
|
|
</StackPanel>
|
2017-09-17 10:00:03 -04:00
|
|
|
|
|
|
|
<!-- Bouton Précédent et titre de la page -->
|
2017-10-12 18:37:49 +02:00
|
|
|
<Grid Grid.Row="0">
|
2017-09-17 10:00:03 -04:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="120"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
2017-10-02 18:40:54 +02:00
|
|
|
<ColumnDefinition Width="200"/>
|
2017-09-17 10:00:03 -04:00
|
|
|
</Grid.ColumnDefinitions>
|
2017-10-12 17:30:29 +02:00
|
|
|
<Button Margin="39,0,39,0" Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}"
|
2017-09-17 10:00:03 -04:00
|
|
|
Style="{StaticResource NavigationBackButtonNormalStyle}"
|
2017-10-06 16:33:44 +02:00
|
|
|
VerticalAlignment="Center"
|
2017-09-17 10:00:03 -04:00
|
|
|
AutomationProperties.Name="Back"
|
|
|
|
AutomationProperties.AutomationId="BackButton"
|
|
|
|
AutomationProperties.ItemType="Navigation Button"/>
|
2017-10-06 14:56:16 +02:00
|
|
|
<TextBox
|
|
|
|
Grid.Column="1"
|
2017-10-13 15:46:41 +02:00
|
|
|
x:Name="TitleTextBox"
|
2017-10-17 18:46:05 +02:00
|
|
|
Text="{Binding Name, Mode=TwoWay}"
|
2017-10-06 14:56:16 +02:00
|
|
|
Style="{StaticResource HeaderTextBoxStyle}"
|
2017-10-06 16:33:44 +02:00
|
|
|
Foreground="{ThemeResource DefaultTextForegroundThemeBrush}"
|
2017-10-06 14:56:16 +02:00
|
|
|
IsHitTestVisible="{Binding IsEditMode}"
|
|
|
|
TextWrapping="NoWrap"
|
|
|
|
VerticalAlignment="Center"
|
2017-10-13 15:46:41 +02:00
|
|
|
Margin="0,0,30,0"
|
|
|
|
PlaceholderText="New entry name..."/>
|
2017-10-06 17:57:36 +02:00
|
|
|
<CommandBar Grid.Column="2" Background="Transparent" IsOpen="True" VerticalAlignment="Center" Margin="0,20,0,0">
|
2017-10-06 14:56:16 +02:00
|
|
|
<AppBarToggleButton Icon="Edit" Label="Edit" IsChecked="{Binding IsEditMode, Mode=TwoWay}" />
|
2017-10-02 18:40:54 +02:00
|
|
|
<AppBarButton Icon="Delete" Label="Delete" Click="AppBarButton_Click" />
|
|
|
|
</CommandBar>
|
2017-09-17 10:00:03 -04:00
|
|
|
</Grid>
|
|
|
|
</Grid>
|
2017-10-19 17:23:56 +02:00
|
|
|
</Page>
|