Added password complexity indicator on new database

Database password control now inside a Border element
Save page also has a title
This commit is contained in:
2017-10-16 16:16:58 +02:00
committed by BONNEVILLE Geoffroy
parent 5497e6fc00
commit 2b8d37057c
13 changed files with 92 additions and 33 deletions

View File

@@ -1,11 +1,11 @@
<UserControl
<UserControl x:Name="UserControl"
x:Class="ModernKeePass.Controls.OpenDatabaseUserControl"
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"
mc:Ignorable="d"
d:DesignHeight="65"
d:DesignHeight="60"
d:DesignWidth="335" Loaded="UserControl_Loaded">
<UserControl.Resources>
<Style TargetType="PasswordBox" x:Name="PasswordBoxWithButtonStyle">
@@ -333,7 +333,7 @@
</Style>
</UserControl.Resources>
<StackPanel>
<PasswordBox x:Name="PasswordBox" Width="300" IsPasswordRevealButtonEnabled="True" KeyDown="PasswordBox_KeyDown" PlaceholderText="Password" Style="{StaticResource PasswordBoxWithButtonStyle}"/>
<PasswordBox x:Name="PasswordBox" Password="{Binding Password, ElementName=UserControl, Mode=TwoWay}" Width="300" IsPasswordRevealButtonEnabled="True" KeyDown="PasswordBox_KeyDown" PlaceholderText="Password" Style="{StaticResource PasswordBoxWithButtonStyle}"/>
<TextBlock x:Name="StatusTextBlock" Height="32" Width="auto" Foreground="#FFBF6969" FontSize="16" FontWeight="Bold" />
</StackPanel>
</UserControl>

View File

@@ -6,6 +6,7 @@ using Windows.UI.Xaml;
using Windows.UI.Xaml.Input;
using ModernKeePass.Common;
using ModernKeePass.Events;
using ModernKeePassLib.Cryptography;
// Pour en savoir plus sur le modèle d'élément Contrôle utilisateur, consultez la page http://go.microsoft.com/fwlink/?LinkId=234236
@@ -23,7 +24,19 @@ namespace ModernKeePass.Controls
"CreateNew",
typeof(bool),
typeof(OpenDatabaseUserControl),
new PropertyMetadata(null, (o, args) => { }));
new PropertyMetadata(false, (o, args) => { }));
public string Password
{
get { return (string)GetValue(PasswordProperty); }
set { SetValue(PasswordProperty, value); }
}
public static readonly DependencyProperty PasswordProperty =
DependencyProperty.Register(
"Password",
typeof(string),
typeof(OpenDatabaseUserControl),
new PropertyMetadata(string.Empty, (o, args) => { }));
public OpenDatabaseUserControl()
{