mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 08:00:16 -04:00
WIP layout enhancments
MainPage list view now has left indicator (more modern)
This commit is contained in:
@@ -30,11 +30,11 @@
|
||||
</TransitionCollection>
|
||||
</Grid.ChildrenTransitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="70"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition x:Name="PrimaryColumn" Width="350" />
|
||||
<ColumnDefinition x:Name="PrimaryColumn" Width="250" />
|
||||
<ColumnDefinition x:Name="SecondaryColumn" Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -44,14 +44,18 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="BackButton" Margin="39,20,0,0" Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}"
|
||||
Style="{StaticResource NavigationBackButtonNormalStyle}"
|
||||
<Button x:Name="BackButton"
|
||||
Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}"
|
||||
Visibility="Collapsed"
|
||||
VerticalAlignment="Top"
|
||||
Height="40"
|
||||
VerticalAlignment="Center"
|
||||
AutomationProperties.Name="Back"
|
||||
AutomationProperties.AutomationId="BackButton"
|
||||
AutomationProperties.ItemType="Navigation Button"/>
|
||||
<TextBlock x:Name="TitleTextBox" Text="{Binding Name}" Grid.Column="1" FontSize="24" Margin="20" />
|
||||
AutomationProperties.ItemType="Navigation Button"
|
||||
Style="{StaticResource NoBorderButtonStyle}">
|
||||
<SymbolIcon Symbol="Back" />
|
||||
</Button>
|
||||
<TextBlock x:Name="TitleTextBox" Text="{Binding Name}" Grid.Column="1" FontSize="24" HorizontalAlignment="Center" />
|
||||
</Grid>
|
||||
<controls:ListViewWithDisable
|
||||
Grid.Column="0"
|
||||
@@ -61,21 +65,16 @@
|
||||
Background="{ThemeResource AppBarBackgroundThemeBrush}"
|
||||
ItemsSource="{Binding Source={StaticResource MenuItemsSource}}"
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
||||
IsSynchronizedWithCurrentItem="False">
|
||||
IsSynchronizedWithCurrentItem="False"
|
||||
ItemContainerStyle="{StaticResource ListViewLeftIndicatorItemExpanded}">
|
||||
<controls:ListViewWithDisable.ItemTemplate>
|
||||
<DataTemplate >
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<SymbolIcon Symbol="{Binding SymbolIcon}" />
|
||||
<TextBlock Text="{Binding Title}" Margin="10,5,0,0" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</controls:ListViewWithDisable.ItemTemplate>
|
||||
<controls:ListViewWithDisable.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
<Setter Property="Padding" Value="20,5,0,0" />
|
||||
<Setter Property="Margin" Value="0" />
|
||||
</Style>
|
||||
</controls:ListViewWithDisable.ItemContainerStyle>
|
||||
<controls:ListViewWithDisable.GroupStyle>
|
||||
<GroupStyle HidesIfEmpty="True">
|
||||
<GroupStyle.HeaderTemplate>
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
using ModernKeePass.ViewModels;
|
||||
|
||||
@@ -30,7 +29,7 @@ namespace ModernKeePass.Pages
|
||||
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
base.OnNavigatedTo(e);
|
||||
DataContext = new MainVm(Frame, MenuFrame);
|
||||
if (Model.SelectedItem == null) MenuFrame.Navigate(typeof(WelcomePage));
|
||||
}
|
||||
|
@@ -12,7 +12,7 @@
|
||||
</Page.DataContext>
|
||||
|
||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<TextBlock Style="{StaticResource HeaderTextBlockStyle}" Margin="80,-60,0,20" FontSize="36">
|
||||
<TextBlock Style="{StaticResource HeaderTextBlockStyle}" Margin="60,-50,0,20" FontSize="36">
|
||||
<Run Text="About"/>
|
||||
</TextBlock>
|
||||
<TextBlock Style="{StaticResource BodyTextBlockStyle}">
|
||||
|
@@ -19,7 +19,7 @@
|
||||
</Page.DataContext>
|
||||
|
||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<TextBlock Style="{StaticResource HeaderTextBlockStyle}" Margin="80,-60,0,20" FontSize="36">
|
||||
<TextBlock Style="{StaticResource HeaderTextBlockStyle}" Margin="60,-50,0,20" FontSize="36">
|
||||
<Run Text="New"></Run>
|
||||
</TextBlock>
|
||||
<HyperlinkButton Content="Create new..." Click="ButtonBase_OnClick" />
|
||||
|
@@ -17,7 +17,7 @@
|
||||
</Page.DataContext>
|
||||
|
||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<TextBlock Style="{StaticResource HeaderTextBlockStyle}" Margin="80,-60,0,20" FontSize="36">
|
||||
<TextBlock Style="{StaticResource HeaderTextBlockStyle}" Margin="60,-50,0,20" FontSize="36">
|
||||
<Run Text="Open"></Run>
|
||||
</TextBlock>
|
||||
<HyperlinkButton Content="Browse files..." Click="ButtonBase_OnClick" />
|
||||
|
@@ -17,13 +17,14 @@
|
||||
<viewModels:RecentVm/>
|
||||
</Page.DataContext>
|
||||
<StackPanel Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
|
||||
<TextBlock Style="{StaticResource HeaderTextBlockStyle}" Margin="80,-60,0,20" FontSize="36">
|
||||
<TextBlock Style="{StaticResource HeaderTextBlockStyle}" Margin="60,-50,0,20" FontSize="36">
|
||||
<Run Text="Recent"/>
|
||||
</TextBlock>
|
||||
<ListView
|
||||
ItemsSource="{Binding Source={StaticResource RecentItemsSource}}"
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
||||
Width="600" >
|
||||
Width="600"
|
||||
ItemContainerStyle="{StaticResource ListViewLeftIndicatorItemExpanded}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="10,0,10,0">
|
||||
@@ -39,12 +40,6 @@
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
</Page>
|
@@ -11,7 +11,7 @@
|
||||
</Page.DataContext>
|
||||
|
||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<TextBlock Style="{StaticResource HeaderTextBlockStyle}" Margin="80,-60,0,20" FontSize="36">
|
||||
<TextBlock Style="{StaticResource HeaderTextBlockStyle}" Margin="60,-50,0,20" FontSize="36">
|
||||
<Run Text="Save"></Run>
|
||||
</TextBlock>
|
||||
<HyperlinkButton Content="Save and close" Click="SaveButton_OnClick" />
|
||||
|
Reference in New Issue
Block a user