mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Shows entries list in group view
Renamed some elements
This commit is contained in:
@@ -28,10 +28,13 @@
|
|||||||
<CollectionViewSource
|
<CollectionViewSource
|
||||||
x:Name="groupsViewSource"
|
x:Name="groupsViewSource"
|
||||||
Source="{Binding Groups}"/>
|
Source="{Binding Groups}"/>
|
||||||
|
<CollectionViewSource
|
||||||
|
x:Name="entriesViewSource"
|
||||||
|
Source="{Binding Entries}"/>
|
||||||
</Grid.Resources>
|
</Grid.Resources>
|
||||||
<!-- Horizontal scrolling grid -->
|
<!-- Horizontal scrolling grid -->
|
||||||
<GridView
|
<GridView
|
||||||
x:Name="groupGridView"
|
x:Name="groupsGridView"
|
||||||
AutomationProperties.AutomationId="ItemGridView"
|
AutomationProperties.AutomationId="ItemGridView"
|
||||||
AutomationProperties.Name="Groups"
|
AutomationProperties.Name="Groups"
|
||||||
TabIndex="1"
|
TabIndex="1"
|
||||||
@@ -39,7 +42,7 @@
|
|||||||
Padding="120,126,120,50"
|
Padding="120,126,120,50"
|
||||||
ItemsSource="{Binding Source={StaticResource groupsViewSource}}"
|
ItemsSource="{Binding Source={StaticResource groupsViewSource}}"
|
||||||
IsSwipeEnabled="false"
|
IsSwipeEnabled="false"
|
||||||
SelectionChanged="itemGridView_SelectionChanged"
|
SelectionChanged="groupsGridView_SelectionChanged"
|
||||||
SelectedIndex="-1" >
|
SelectedIndex="-1" >
|
||||||
<GridView.ItemTemplate>
|
<GridView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
@@ -62,7 +65,18 @@
|
|||||||
</GridView.ItemTemplate>
|
</GridView.ItemTemplate>
|
||||||
<GridView.Header>
|
<GridView.Header>
|
||||||
<StackPanel Width="480" Margin="0,4,14,0">
|
<StackPanel Width="480" Margin="0,4,14,0">
|
||||||
<ListView x:Name="listView" Height="100"/>
|
<ListView x:Name="entriesListView" Height="100" ItemsSource="{Binding Source={StaticResource entriesViewSource}}" Margin="10,0,0,0" ItemClick="entriesListView_ItemClick">
|
||||||
|
<ListView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListView.ItemTemplate>
|
||||||
|
</ListView>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</GridView.Header>
|
</GridView.Header>
|
||||||
<GridView.ItemContainerStyle>
|
<GridView.ItemContainerStyle>
|
||||||
|
@@ -67,7 +67,7 @@ namespace ModernKeePass.Pages
|
|||||||
if (e.Parameter is GroupVm)
|
if (e.Parameter is GroupVm)
|
||||||
{
|
{
|
||||||
DataContext = e.Parameter as GroupVm;
|
DataContext = e.Parameter as GroupVm;
|
||||||
groupGridView.SelectedIndex = -1;
|
groupsGridView.SelectedIndex = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,10 +78,15 @@ namespace ModernKeePass.Pages
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private void itemGridView_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void groupsGridView_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var gridView = sender as GridView;
|
var gridView = sender as GridView;
|
||||||
Frame.Navigate(typeof(GroupDetailPage), gridView.SelectedItem as GroupVm);
|
Frame.Navigate(typeof(GroupDetailPage), gridView.SelectedItem as GroupVm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void entriesListView_ItemClick(object sender, ItemClickEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user