diff --git a/ModernKeePass/App.xaml b/ModernKeePass/App.xaml
index 65cbb66..86fd33e 100644
--- a/ModernKeePass/App.xaml
+++ b/ModernKeePass/App.xaml
@@ -2,6 +2,44 @@
x:Class="ModernKeePass.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="using:ModernKeePass">
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008">
+
+
+
diff --git a/ModernKeePass/ModernKeePass.csproj b/ModernKeePass/ModernKeePass.csproj
index 390e322..32dbd51 100644
--- a/ModernKeePass/ModernKeePass.csproj
+++ b/ModernKeePass/ModernKeePass.csproj
@@ -222,7 +222,11 @@
True
-
+
+
+ BehaviorsXamlSDKManaged
+
+
diff --git a/ModernKeePass/Pages/GroupDetailPage.xaml b/ModernKeePass/Pages/GroupDetailPage.xaml
index f479094..61465b8 100644
--- a/ModernKeePass/Pages/GroupDetailPage.xaml
+++ b/ModernKeePass/Pages/GroupDetailPage.xaml
@@ -6,6 +6,8 @@
xmlns:viewModels="using:ModernKeePass.ViewModels"
xmlns:converters="using:ModernKeePass.Converters"
xmlns:local="using:ModernKeePass.Controls"
+ xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
+ xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
x:Name="PageRoot"
x:Class="ModernKeePass.Pages.GroupDetailPage"
mc:Ignorable="d" >
@@ -18,7 +20,6 @@
-
-
-
-
+
+
+
+
+
+
-
+
@@ -131,23 +130,29 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -196,11 +201,11 @@
Margin="0,40,0,0"
Background="Transparent"
IsOpen="True">
-
+
diff --git a/ModernKeePass/Pages/GroupDetailPage.xaml.cs b/ModernKeePass/Pages/GroupDetailPage.xaml.cs
index 00112fd..eb58bb0 100644
--- a/ModernKeePass/Pages/GroupDetailPage.xaml.cs
+++ b/ModernKeePass/Pages/GroupDetailPage.xaml.cs
@@ -26,8 +26,6 @@ namespace ModernKeePass.Pages
InitializeComponent();
NavigationHelper = new NavigationHelper(this);
NavigationHelper.LoadState += navigationHelper_LoadState;
- LeftListView.ItemTemplate = (DataTemplate)LeftListView.Resources["Collapsed"];
- LeftListView.HeaderTemplate = (DataTemplate)LeftListView.Resources["Forward"];
}
///
@@ -106,22 +104,5 @@ namespace ModernKeePass.Pages
group?.RemoveGroup();
if (Frame.CanGoBack) Frame.GoBack();
}
-
- private void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
- {
- var button = sender as Button;
- if (button == null) return;
- switch (button.Name)
- {
- case "ForwardButton":
- LeftListView.ItemTemplate = (DataTemplate) LeftListView.Resources["Expanded"];
- LeftListView.HeaderTemplate = (DataTemplate) LeftListView.Resources["Back"];
- break;
- case "BackButton":
- LeftListView.ItemTemplate = (DataTemplate)LeftListView.Resources["Collapsed"];
- LeftListView.HeaderTemplate = (DataTemplate)LeftListView.Resources["Forward"];
- break;
- }
- }
}
}
diff --git a/ModernKeePass/ViewModels/GroupVm.cs b/ModernKeePass/ViewModels/GroupVm.cs
index e9d1747..d4e48bb 100644
--- a/ModernKeePass/ViewModels/GroupVm.cs
+++ b/ModernKeePass/ViewModels/GroupVm.cs
@@ -14,10 +14,10 @@ namespace ModernKeePass.ViewModels
public ObservableCollection Entries { get; set; } = new ObservableCollection();
public ObservableCollection Groups { get; set; } = new ObservableCollection();
public string Name => _pwGroup == null ? "New group" : _pwGroup.Name;
-
public int EntryCount => Entries.Count - 1;
-
public int GroupCount => Groups.Count - 1;
+ public bool IsNotRoot => ParentGroup != null;
+ public FontWeight FontWeight => _pwGroup == null ? FontWeights.Bold : FontWeights.Normal;
public Symbol IconSymbol
{
@@ -29,10 +29,15 @@ namespace ModernKeePass.ViewModels
}
}
- public bool IsNotRoot => ParentGroup != null;
- public FontWeight FontWeight => _pwGroup == null ? FontWeights.Bold : FontWeights.Normal;
+ public bool IsLeftPaneOpen
+ {
+ get { return _isLeftPaneOpen; }
+ set { SetProperty(ref _isLeftPaneOpen, value); }
+ }
private readonly PwGroup _pwGroup;
+ private bool _isLeftPaneOpen;
+
public GroupVm() {}
public GroupVm(PwGroup pwGroup, GroupVm parent)