Exemplo n.º 1
0
        private void BtnClose_OnClick(object sender, RoutedEventArgs e)
        {
            var view = new SignOutDialog()
            {
                DataContext = new SignOutDialogVM()
            };

            var result = DialogHostEx.ShowDialog(this, view, MainLoginClosingEventHandler);
        }
Exemplo n.º 2
0
        private void MainLogin_Closing(object sender, CancelEventArgs e)
        {
            e.Cancel = true;

            //let's set up a little MVVM, cos that's what the cool kids are doing:
            var view = new SignOutDialog()
            {
                DataContext = new SignOutDialogVM()
            };

            var result = DialogHostEx.ShowDialog(this, view, MainLoginClosingEventHandler);
        }
Exemplo n.º 3
0
        private void ExecuteRunExtendedDialog(object o)
        {
            //let's set up a little MVVM, cos that's what the cool kids are doing:
            var view = new SignOutDialog()
            {
                DataContext = new SignOutDialogVM()
            };

            //show the dialog
            DialogHost.Show(view, o, ExtendedOpenedEventHandler, ExtendedClosingEventHandler);

            //check the result...
            //Console.WriteLine("Dialog was closed, the CommandParameter used to close it was: " + (result ?? "NULL"));
        }
Exemplo n.º 4
0
        private async void WindowClosing(object obj)
        {
            //let's set up a little MVVM, cos that's what the cool kids are doing:
            var view = new SignOutDialog()
            {
                DataContext = new SignOutDialogVM()
            };

            //show the dialog
            await DialogHost.Show(view, (object)"MainDialog", WindowClosingEventHandler, WindowClosingEventHandler);

            //check the result...
            //Console.WriteLine("Dialog was closed, the CommandParameter used to close it was: " + (result ?? "NULL"));
        }