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-11 14:30:07 +02:00
|
|
|
xmlns:converters="using:ModernKeePass.Converters"
|
2017-11-06 19:01:01 +01:00
|
|
|
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
|
|
|
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
|
2017-09-29 17:23:35 -04:00
|
|
|
x:Class="ModernKeePass.Pages.RecentDatabasesPage"
|
|
|
|
mc:Ignorable="d">
|
|
|
|
<Page.Resources>
|
2017-10-09 18:40:02 +02:00
|
|
|
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
|
|
|
<CollectionViewSource x:Name="RecentItemsSource" Source="{Binding RecentItems}" />
|
2017-09-29 17:23:35 -04:00
|
|
|
</Page.Resources>
|
2017-10-03 16:06:49 +02:00
|
|
|
<Page.DataContext>
|
|
|
|
<viewModels:RecentVm/>
|
|
|
|
</Page.DataContext>
|
2017-10-27 18:38:54 +02:00
|
|
|
<ListView Background="{StaticResource ApplicationPageBackgroundThemeBrush}"
|
|
|
|
ItemsSource="{Binding Source={StaticResource RecentItemsSource}}"
|
|
|
|
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
|
|
|
ItemContainerStyle="{StaticResource ListViewLeftIndicatorItemExpanded}">
|
|
|
|
<ListView.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Grid Margin="10,0,10,0">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition />
|
|
|
|
<RowDefinition />
|
|
|
|
<RowDefinition />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Text="{Binding Name}" Padding="5,0,0,0" />
|
|
|
|
<TextBlock Grid.Row="1" Text="{Binding Path}" Padding="5,0,0,0" FontSize="10" />
|
|
|
|
<local:OpenDatabaseUserControl Grid.Row="2" x:Name="DatabaseUserControl" HorizontalAlignment="Stretch" MinWidth="400" Margin="0,10,0,0" Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}" ValidationChecking="OpenDatabaseUserControl_OnValidationChecking" >
|
|
|
|
<interactivity:Interaction.Behaviors>
|
2017-11-06 19:01:01 +01:00
|
|
|
<core:EventTriggerBehavior EventName="ValidationChecked">
|
|
|
|
<core:NavigateToPageAction TargetPage="ModernKeePass.Pages.GroupDetailPage" />
|
|
|
|
</core:EventTriggerBehavior>
|
2017-10-27 18:38:54 +02:00
|
|
|
</interactivity:Interaction.Behaviors>
|
|
|
|
</local:OpenDatabaseUserControl>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ListView.ItemTemplate>
|
|
|
|
</ListView>
|
2017-10-03 16:06:49 +02:00
|
|
|
</Page>
|