2017-10-16 16:16:58 +02:00
|
|
|
<UserControl x:Name="UserControl"
|
2017-10-02 10:44:04 +02:00
|
|
|
x:Class="ModernKeePass.Controls.OpenDatabaseUserControl"
|
2017-09-30 09:00:32 -04:00
|
|
|
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-26 12:38:34 +02:00
|
|
|
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
|
|
|
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
|
|
|
|
xmlns:actions="using:ModernKeePass.Actions"
|
2017-09-30 09:00:32 -04:00
|
|
|
mc:Ignorable="d"
|
2017-11-03 15:48:55 +01:00
|
|
|
d:DesignHeight="120"
|
2017-10-26 12:38:34 +02:00
|
|
|
d:DesignWidth="550" >
|
2017-10-12 17:30:29 +02:00
|
|
|
<UserControl.Resources>
|
2017-10-24 18:43:46 +02:00
|
|
|
<SolidColorBrush x:Key="ErrorColorBrush" Color="Red"/>
|
2017-10-12 17:30:29 +02:00
|
|
|
</UserControl.Resources>
|
2017-11-03 15:48:55 +01:00
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="50" />
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="40" />
|
|
|
|
<RowDefinition Height="40" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<CheckBox x:Name="PasswordCheckBox" Grid.Row="0" Grid.Column="0" />
|
2017-11-03 18:32:00 +01:00
|
|
|
<PasswordBox Grid.Row="0" Grid.Column="1" x:Name="PasswordBox" Password="{Binding Password, ElementName=UserControl, Mode=TwoWay}" Height="30" IsEnabled="{Binding IsChecked, ElementName=PasswordCheckBox}" IsPasswordRevealButtonEnabled="True" KeyDown="PasswordBox_KeyDown" PlaceholderText="Password" >
|
|
|
|
<interactivity:Interaction.Behaviors>
|
|
|
|
<core:DataTriggerBehavior Binding="{Binding IsChecked, ElementName=PasswordCheckBox}" Value="True">
|
|
|
|
<actions:SetupFocusAction TargetObject="{Binding ElementName=PasswordBox}" />
|
|
|
|
</core:DataTriggerBehavior>
|
|
|
|
</interactivity:Interaction.Behaviors>
|
|
|
|
</PasswordBox>
|
2017-11-03 15:48:55 +01:00
|
|
|
<CheckBox x:Name="KeyFileCheckBox" Grid.Row="1" Grid.Column="0" />
|
2017-11-03 18:32:00 +01:00
|
|
|
<HyperlinkButton Grid.Row="1" Grid.Column="1" Margin="-15,0,0,0" Content="Select key file from disk..." IsEnabled="{Binding IsChecked, ElementName=KeyFileCheckBox}" Click="KeyFileButton_Click" />
|
|
|
|
<Button Grid.Column="0" Grid.Row="2" Content="OK" Click="OpenButton_OnClick" Background="{ThemeResource ListViewItemSelectedPointerOverBorderThemeBrush}" Foreground="{ThemeResource TextBoxBackgroundThemeBrush}" />
|
2017-11-03 15:48:55 +01:00
|
|
|
<TextBlock Grid.Column="1" Grid.Row="2" x:Name="StatusTextBlock" Height="28" FontSize="14" FontWeight="Light" TextWrapping="WrapWholeWords" HorizontalAlignment="Right" />
|
|
|
|
</Grid>
|
2017-09-30 09:00:32 -04:00
|
|
|
</UserControl>
|