mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 16:10:16 -04:00
Main page now allows password input
Group nesting works
This commit is contained in:
@@ -26,20 +26,21 @@
|
||||
|
||||
<Grid.Resources>
|
||||
<CollectionViewSource
|
||||
x:Name="itemsViewSource"
|
||||
x:Name="groupsViewSource"
|
||||
Source="{Binding Groups}"/>
|
||||
</Grid.Resources>
|
||||
<!-- Horizontal scrolling grid -->
|
||||
<GridView
|
||||
x:Name="itemGridView"
|
||||
x:Name="groupGridView"
|
||||
AutomationProperties.AutomationId="ItemGridView"
|
||||
AutomationProperties.Name="Groups"
|
||||
TabIndex="1"
|
||||
Grid.RowSpan="2"
|
||||
Padding="120,126,120,50"
|
||||
ItemsSource="{Binding Source={StaticResource itemsViewSource}}"
|
||||
SelectionMode="None"
|
||||
IsSwipeEnabled="false">
|
||||
ItemsSource="{Binding Source={StaticResource groupsViewSource}}"
|
||||
IsSwipeEnabled="false"
|
||||
SelectionChanged="itemGridView_SelectionChanged"
|
||||
SelectedIndex="-1" >
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Height="110" Width="480" Margin="10">
|
||||
@@ -54,15 +55,14 @@
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap"/>
|
||||
<TextBlock Style="{StaticResource CaptionTextBlockStyle}" TextWrapping="NoWrap"/>
|
||||
<TextBlock Text="{Binding EntryCount}" Style="{StaticResource BodyTextBlockStyle}" MaxHeight="60"/>
|
||||
<TextBlock Text="{Binding GroupCount}" Style="{StaticResource BodyTextBlockStyle}" MaxHeight="60"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
<GridView.Header>
|
||||
<StackPanel Width="480" Margin="0,4,14,0">
|
||||
<TextBlock Margin="0,0,0,20" Style="{StaticResource SubheaderTextBlockStyle}" MaxHeight="60" Text="{Binding Entries.Count}"/>
|
||||
<Image Height="400" Margin="0,0,0,20" Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/>
|
||||
<TextBlock Margin="0,0,0,0" Style="{StaticResource BodyTextBlockStyle}"/>
|
||||
<ListView x:Name="listView" Height="100"/>
|
||||
</StackPanel>
|
||||
</GridView.Header>
|
||||
<GridView.ItemContainerStyle>
|
||||
|
@@ -47,8 +47,6 @@ namespace ModernKeePass.Pages
|
||||
/// session. The state will be null the first time a page is visited.</param>
|
||||
private void navigationHelper_LoadState(object sender, LoadStateEventArgs e)
|
||||
{
|
||||
// TODO: Assign a bindable group to this.DefaultViewModel["Group"]
|
||||
// TODO: Assign a collection of bindable items to this.DefaultViewModel["Items"]
|
||||
}
|
||||
|
||||
#region NavigationHelper registration
|
||||
@@ -69,6 +67,7 @@ namespace ModernKeePass.Pages
|
||||
if (e.Parameter is GroupVm)
|
||||
{
|
||||
DataContext = e.Parameter as GroupVm;
|
||||
groupGridView.SelectedIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,5 +77,11 @@ namespace ModernKeePass.Pages
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void itemGridView_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
var gridView = sender as GridView;
|
||||
Frame.Navigate(typeof(GroupDetailPage), gridView.SelectedItem as GroupVm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user