All VMs use viewmodellocator

This commit is contained in:
Geoffroy BONNEVILLE
2020-04-25 22:03:47 +02:00
parent df973c5f62
commit 7778e45deb
12 changed files with 79 additions and 142 deletions

View File

@@ -27,7 +27,8 @@ namespace ModernKeePass.Views
var args = e.Parameter as NavigationItem;
if (args != null)
{
DataContext = new EntryDetailVm(args.Id) { IsEditMode = args.IsNew };
await Model.Initialize(args.Id);
Model.IsEditMode = args.IsNew;
if (args.IsNew) await Model.GeneratePassword();
}
}