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-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"
|
2017-12-08 19:38:33 +01:00
|
|
|
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
|
|
|
|
xmlns:userControls="using:ModernKeePass.Views.UserControls"
|
|
|
|
x:Class="ModernKeePass.Views.RecentDatabasesPage"
|
2017-09-29 17:23:35 -04:00
|
|
|
mc:Ignorable="d">
|
|
|
|
<Page.Resources>
|
2017-10-09 18:40:02 +02:00
|
|
|
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
2020-04-09 19:43:06 +02:00
|
|
|
<viewModels:RecentVm x:Key="ViewModel"/>
|
|
|
|
<!--<CollectionViewSource x:Name="RecentItemsSource" Source="{Binding RecentItems}" />-->
|
2017-09-29 17:23:35 -04:00
|
|
|
</Page.Resources>
|
2020-04-09 19:43:06 +02:00
|
|
|
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}" DataContext="{StaticResource ViewModel}">
|
2017-12-04 10:46:01 +01:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="40" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
</Grid.RowDefinitions>
|
2018-06-20 18:41:56 +02:00
|
|
|
<HyperlinkButton Grid.Row="0" HorizontalAlignment="Right" Style="{StaticResource MainColorHyperlinkButton}" Foreground="{StaticResource MainColor}" Command="{Binding ClearAllCommand}">
|
2017-12-04 10:46:01 +01:00
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<SymbolIcon Symbol="Cancel" />
|
|
|
|
<TextBlock x:Uid="RecentClear" VerticalAlignment="Center" Margin="10,0,0,0" />
|
|
|
|
</StackPanel>
|
|
|
|
</HyperlinkButton>
|
|
|
|
<ListView Grid.Row="1"
|
2020-04-09 19:43:06 +02:00
|
|
|
ItemsSource="{Binding RecentItems}"
|
2017-12-04 10:46:01 +01:00
|
|
|
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" />
|
2020-04-07 12:48:18 +02:00
|
|
|
<userControls:CompositeKeyUserControl Grid.Row="2" x:Name="DatabaseUserControl" x:Uid="CompositeKeyOpenButton" HorizontalAlignment="Stretch" MinWidth="400" Margin="0,10,0,0" Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}" DatabaseFilePath="{Binding Token}">
|
2017-12-04 10:46:01 +01:00
|
|
|
<interactivity:Interaction.Behaviors>
|
2020-04-09 19:43:06 +02:00
|
|
|
<core:EventTriggerBehavior EventName="ValidationChecking">
|
2017-12-04 10:46:01 +01:00
|
|
|
<core:CallMethodAction TargetObject="{Binding}" MethodName="UpdateAccessTime" />
|
2020-04-09 19:43:06 +02:00
|
|
|
</core:EventTriggerBehavior>
|
|
|
|
<core:EventTriggerBehavior EventName="ValidationChecked">
|
2017-12-08 19:38:33 +01:00
|
|
|
<core:NavigateToPageAction TargetPage="ModernKeePass.Views.GroupDetailPage" />
|
2017-12-04 10:46:01 +01:00
|
|
|
</core:EventTriggerBehavior>
|
|
|
|
</interactivity:Interaction.Behaviors>
|
2017-12-08 19:38:33 +01:00
|
|
|
</userControls:CompositeKeyUserControl>
|
2017-12-04 10:46:01 +01:00
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ListView.ItemTemplate>
|
|
|
|
</ListView>
|
|
|
|
</Grid>
|
2017-10-03 16:06:49 +02:00
|
|
|
</Page>
|