mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
New color to brush converter
New boolean to visibility converter Base class to handle property changes notifications for all View Models Template selector to handle a different first item in listviews or gridviews
This commit is contained in:
@@ -5,27 +5,29 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewModels="using:ModernKeePass.ViewModels"
|
||||
xmlns:local="using:ModernKeePass.Controls"
|
||||
xmlns:Converters="using:ModernKeePass.Converters"
|
||||
x:Class="ModernKeePass.Pages.RecentDatabasesPage"
|
||||
mc:Ignorable="d">
|
||||
<Page.DataContext>
|
||||
<viewModels:RecentVm/>
|
||||
</Page.DataContext>
|
||||
<Page.Resources>
|
||||
<Converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<CollectionViewSource
|
||||
x:Name="RecentItemsSource"
|
||||
Source="{Binding RecentItems}" />
|
||||
</Page.Resources>
|
||||
<Page.DataContext>
|
||||
<viewModels:RecentVm/>
|
||||
</Page.DataContext>
|
||||
<ListView
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
||||
ItemsSource="{Binding Source={StaticResource RecentItemsSource}}"
|
||||
x:Name="RecentListView"
|
||||
SelectionChanged="RecentListView_SelectionChanged"
|
||||
IsSynchronizedWithCurrentItem="False">
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Name}" Width="350" Padding="5" />
|
||||
<local:OpenDatabaseUserControl Visibility="{Binding PasswordVisibility}" ValidationChecked="PasswordUserControl_PasswordChecked" />
|
||||
<local:OpenDatabaseUserControl Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}" ValidationChecked="PasswordUserControl_PasswordChecked" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
@@ -36,4 +38,4 @@
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
</ListView>
|
||||
</Page>
|
||||
</Page>
|
Reference in New Issue
Block a user