mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Migrated code from code behind pages to view models Auto select Recents if there are any recent items WIP auto focus on password box when opening database
86 lines
5.0 KiB
XML
86 lines
5.0 KiB
XML
<Page
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:ModernKeePass.Pages"
|
|
xmlns:common="using:ModernKeePass.Common"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:ViewModels="using:ModernKeePass.ViewModels"
|
|
xmlns:Converters="using:ModernKeePass.Converters"
|
|
x:Name="pageRoot"
|
|
x:Class="ModernKeePass.Pages.EntryDetailPage"
|
|
mc:Ignorable="d">
|
|
|
|
<Page.Resources>
|
|
<Converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
|
<Converters:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter"/>
|
|
</Page.Resources>
|
|
|
|
<Page.DataContext>
|
|
<ViewModels:EntryVm/>
|
|
</Page.DataContext>
|
|
|
|
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
|
<Grid.ChildrenTransitions>
|
|
<TransitionCollection>
|
|
<EntranceThemeTransition/>
|
|
</TransitionCollection>
|
|
</Grid.ChildrenTransitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="140"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Grid.Row="1" Margin="20,0,0,0" >
|
|
<StackPanel.Resources>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="Margin" Value="0,20,0,0"/>
|
|
</Style>
|
|
</StackPanel.Resources>
|
|
<TextBlock x:Name="userTextBlock" TextWrapping="Wrap" Text="User name or login" FontSize="18"/>
|
|
<TextBox x:Name="userTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding UserName, Mode=TwoWay}" Width="350" Height="32" />
|
|
<TextBlock x:Name="passwordTextBlock" TextWrapping="Wrap" Text="Password" FontSize="18"/>
|
|
<PasswordBox x:Name="passwordBox" HorizontalAlignment="Left" Password="{Binding Password, Mode=TwoWay}" Width="350" Height="32" IsPasswordRevealButtonEnabled="True" Visibility="{Binding IsRevealPassword, Converter={StaticResource InverseBooleanToVisibilityConverter}}" />
|
|
<TextBox x:Name="passwordTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Password, Mode=TwoWay}" Width="350" Height="32" Visibility="{Binding IsRevealPassword, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
|
<CheckBox x:Name="checkBox" HorizontalAlignment="Left" Margin="-3,0,0,0" Content="Show password" IsChecked="{Binding IsRevealPassword, Mode=TwoWay}"/>
|
|
<TextBlock x:Name="urlTextBlock" TextWrapping="Wrap" Text="URL" FontSize="18"/>
|
|
<StackPanel Orientation="Horizontal" Margin="0,-1,0,-1" Width="350" HorizontalAlignment="Left">
|
|
<TextBox x:Name="urlTextBox" TextWrapping="Wrap" Text="{Binding Url, Mode=TwoWay}" Height="32" Width="350" MaxLength="256" Padding="0,0,34,0" />
|
|
<Button Click="UrlButton_Click" Height="34" Margin="-34,0,0,0" Background="Transparent" Padding="2,0" >
|
|
<SymbolIcon Symbol="Forward" VerticalAlignment="Center" />
|
|
</Button>
|
|
</StackPanel>
|
|
<TextBlock x:Name="notesTextBlock" TextWrapping="Wrap" Text="Notes" FontSize="18"/>
|
|
<TextBox x:Name="notesTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Notes, Mode=TwoWay}" Width="350" Height="200" AcceptsReturn="True" IsSpellCheckEnabled="True" />
|
|
</StackPanel>
|
|
|
|
<!-- Bouton Précédent et titre de la page -->
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="120"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="200"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Button Margin="39,0,39,0" Command="{Binding NavigationHelper.GoBackCommand, ElementName=pageRoot}"
|
|
Style="{StaticResource NavigationBackButtonNormalStyle}"
|
|
VerticalAlignment="Center"
|
|
AutomationProperties.Name="Back"
|
|
AutomationProperties.AutomationId="BackButton"
|
|
AutomationProperties.ItemType="Navigation Button"/>
|
|
<TextBox
|
|
Grid.Column="1"
|
|
Text="{Binding Title, Mode=TwoWay}"
|
|
Style="{StaticResource HeaderTextBoxStyle}"
|
|
Foreground="{ThemeResource DefaultTextForegroundThemeBrush}"
|
|
IsHitTestVisible="{Binding IsEditMode}"
|
|
TextWrapping="NoWrap"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,30,0"/>
|
|
<CommandBar Grid.Column="2" Background="Transparent" IsOpen="True" VerticalAlignment="Center" Margin="0,20,0,0">
|
|
<AppBarToggleButton Icon="Edit" Label="Edit" IsChecked="{Binding IsEditMode, Mode=TwoWay}" />
|
|
<AppBarButton Icon="Delete" Label="Delete" Click="AppBarButton_Click" />
|
|
</CommandBar>
|
|
</Grid>
|
|
</Grid>
|
|
</Page>
|