2017-09-29 17:23:35 -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"
|
|
|
|
xmlns:viewModels="using:ModernKeePass.ViewModels"
|
2017-10-01 08:48:29 -04:00
|
|
|
xmlns:local="using:ModernKeePass.Controls"
|
2017-10-03 16:06:49 +02:00
|
|
|
xmlns:Converters="using:ModernKeePass.Converters"
|
2017-09-29 17:23:35 -04:00
|
|
|
x:Class="ModernKeePass.Pages.RecentDatabasesPage"
|
|
|
|
mc:Ignorable="d">
|
|
|
|
<Page.Resources>
|
2017-10-03 16:06:49 +02:00
|
|
|
<Converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
2017-09-29 17:23:35 -04:00
|
|
|
<CollectionViewSource
|
|
|
|
x:Name="RecentItemsSource"
|
|
|
|
Source="{Binding RecentItems}" />
|
|
|
|
</Page.Resources>
|
2017-10-03 16:06:49 +02:00
|
|
|
<Page.DataContext>
|
|
|
|
<viewModels:RecentVm/>
|
|
|
|
</Page.DataContext>
|
2017-09-29 17:23:35 -04:00
|
|
|
<ListView
|
|
|
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
|
|
|
ItemsSource="{Binding Source={StaticResource RecentItemsSource}}"
|
|
|
|
x:Name="RecentListView"
|
|
|
|
SelectionChanged="RecentListView_SelectionChanged"
|
2017-10-03 16:06:49 +02:00
|
|
|
SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
|
2017-09-29 17:23:35 -04:00
|
|
|
<ListView.ItemTemplate>
|
|
|
|
<DataTemplate>
|
2017-10-06 17:57:36 +02:00
|
|
|
<StackPanel Margin="10,0,10,0">
|
2017-10-01 08:48:29 -04:00
|
|
|
<TextBlock Text="{Binding Name}" Width="350" Padding="5" />
|
2017-10-03 16:06:49 +02:00
|
|
|
<local:OpenDatabaseUserControl Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}" ValidationChecked="PasswordUserControl_PasswordChecked" />
|
2017-10-01 08:48:29 -04:00
|
|
|
</StackPanel>
|
2017-09-29 17:23:35 -04:00
|
|
|
</DataTemplate>
|
|
|
|
</ListView.ItemTemplate>
|
|
|
|
<ListView.ItemContainerStyle>
|
|
|
|
<Style TargetType="ListViewItem">
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
|
|
|
</Style>
|
|
|
|
</ListView.ItemContainerStyle>
|
|
|
|
</ListView>
|
2017-10-03 16:06:49 +02:00
|
|
|
</Page>
|