2017-10-09 18:40:02 +02:00
|
|
|
|
using Windows.UI.Xaml.Controls;
|
2017-09-28 17:51:30 +02:00
|
|
|
|
using Windows.UI.Xaml.Navigation;
|
2017-09-13 18:37:44 +02:00
|
|
|
|
using ModernKeePass.ViewModels;
|
2017-09-12 18:20:32 +02:00
|
|
|
|
|
2017-09-11 15:13:04 +02:00
|
|
|
|
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
|
2017-09-10 13:49:11 -04:00
|
|
|
|
|
|
|
|
|
namespace ModernKeePass
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2017-09-11 15:13:04 +02:00
|
|
|
|
/// An empty page that can be used on its own or navigated to within a Frame.
|
2017-09-10 13:49:11 -04:00
|
|
|
|
/// </summary>
|
2017-10-12 17:45:37 +02:00
|
|
|
|
public sealed partial class MainPage
|
2017-09-10 13:49:11 -04:00
|
|
|
|
{
|
2017-10-12 18:37:49 +02:00
|
|
|
|
public MainVm Model => (MainVm)DataContext;
|
|
|
|
|
|
2017-09-10 13:49:11 -04:00
|
|
|
|
public MainPage()
|
|
|
|
|
{
|
2017-09-26 18:18:00 +02:00
|
|
|
|
InitializeComponent();
|
2017-09-28 17:51:30 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnNavigatedTo(NavigationEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
base.OnNavigatedTo(e);
|
2017-10-09 18:40:02 +02:00
|
|
|
|
DataContext = new MainVm(Frame, MenuFrame);
|
2017-09-11 18:25:00 +02:00
|
|
|
|
}
|
2017-09-28 17:51:30 +02:00
|
|
|
|
|
2017-09-20 18:19:00 +02:00
|
|
|
|
private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
|
|
|
{
|
2017-10-12 18:37:49 +02:00
|
|
|
|
Model.SelectedItem?.Destination.Navigate(Model.SelectedItem.PageType, Model.SelectedItem.Parameter);
|
2017-09-25 18:34:27 +02:00
|
|
|
|
}
|
2017-09-10 13:49:11 -04:00
|
|
|
|
}
|
|
|
|
|
}
|