mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Migrated code from code behind pages to view models Auto select Recents if there are any recent items WIP auto focus on password box when opening database
32 lines
943 B
C#
32 lines
943 B
C#
using Windows.UI.Xaml.Controls;
|
|
using Windows.UI.Xaml.Navigation;
|
|
using ModernKeePass.ViewModels;
|
|
|
|
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
|
|
|
|
namespace ModernKeePass
|
|
{
|
|
/// <summary>
|
|
/// An empty page that can be used on its own or navigated to within a Frame.
|
|
/// </summary>
|
|
public sealed partial class MainPage : Page
|
|
{
|
|
public MainPage()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
protected override void OnNavigatedTo(NavigationEventArgs e)
|
|
{
|
|
base.OnNavigatedTo(e);
|
|
DataContext = new MainVm(Frame, MenuFrame);
|
|
}
|
|
|
|
private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
var mainVm = DataContext as MainVm;
|
|
mainVm.SelectedItem?.Destination.Navigate(mainVm.SelectedItem.PageType, mainVm.SelectedItem.Parameter);
|
|
}
|
|
}
|
|
}
|