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:
@@ -1,5 +1,6 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using Windows.Storage.AccessCache;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
@@ -32,11 +33,23 @@ namespace ModernKeePass
|
||||
};
|
||||
var app = (App)Application.Current;
|
||||
if (app.Database != null && app.Database.IsOpen)
|
||||
mainMenuItems.Add(new MainMenuItemVm { Title = app.Database.Name, PageType = typeof(GroupDetailPage), Destination = Frame, Parameter = app.Database.RootGroup, Group = 1, SymbolIcon = Symbol.ProtectedDocument});
|
||||
|
||||
mainMenuItems.Add(new MainMenuItemVm
|
||||
{
|
||||
Title = app.Database.Name,
|
||||
PageType = typeof(GroupDetailPage),
|
||||
Destination = Frame,
|
||||
Parameter = app.Database.RootGroup,
|
||||
Group = 1,
|
||||
SymbolIcon = Symbol.ProtectedDocument
|
||||
});
|
||||
var mainVm = DataContext as MainVm;
|
||||
mainVm.MainMenuItems = from item in mainMenuItems group item by item.Group into grp orderby grp.Key select grp;
|
||||
mainVm.NotifyPropertyChanged("MainMenuItems");
|
||||
/*if (app.Database == null || !app.Database.IsOpen)
|
||||
{
|
||||
var mru = StorageApplicationPermissions.MostRecentlyUsedList;
|
||||
if (mru.Entries.Count > 0) MenuListView.SelectedIndex = 3;
|
||||
}*/
|
||||
//mainVm.NotifyPropertyChanged("MainMenuItems");
|
||||
}
|
||||
|
||||
private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
|
Reference in New Issue
Block a user