mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 08:00:16 -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:
@@ -17,6 +17,8 @@ namespace ModernKeePass.Pages
|
||||
{
|
||||
private Frame _mainFrame;
|
||||
|
||||
public OpenVm Model => (OpenVm)DataContext;
|
||||
|
||||
public OpenDatabasePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -38,9 +40,8 @@ namespace ModernKeePass.Pages
|
||||
};
|
||||
picker.FileTypeFilter.Add(".kdbx");
|
||||
|
||||
var viewModel = DataContext as OpenVm;
|
||||
// Application now has read/write access to the picked file
|
||||
viewModel?.OpenFile(await picker.PickSingleFileAsync());
|
||||
Model.OpenFile(await picker.PickSingleFileAsync());
|
||||
}
|
||||
|
||||
private void PasswordUserControl_PasswordChecked(object sender, PasswordEventArgs e)
|
||||
|
Reference in New Issue
Block a user