mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Added ViewModel property in code behind of all pages
Workaround a bug in Entry password reveal when set for the first time
This commit is contained in:
@@ -16,6 +16,8 @@ namespace ModernKeePass.Pages
|
||||
{
|
||||
private Frame _mainFrame;
|
||||
|
||||
public RecentVm Model => (RecentVm)DataContext;
|
||||
|
||||
public RecentDatabasesPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -34,10 +36,8 @@ namespace ModernKeePass.Pages
|
||||
|
||||
private void OpenDatabaseUserControl_OnValidationChecking(object sender, EventArgs e)
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
var viewModel = DataContext as RecentVm;
|
||||
var app = (App)Application.Current;
|
||||
app.Database.DatabaseFile = viewModel?.SelectedItem.DatabaseFile;
|
||||
app.Database.DatabaseFile = Model.SelectedItem.DatabaseFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user