예제 #1
0
        public MainWindow()
        {
            _viewModel  = new MainWindowViewModel(DialogCoordinator.Instance);
            DataContext = _viewModel;

            InitializeComponent();

            flyoutDemo = new FlyoutDemo();
            flyoutDemo.ApplyTemplate();
            flyoutDemo.Closed += (o, e) => flyoutDemo = null;
        }
예제 #2
0
        public MainWindow()
        {
            _viewModel  = new MainWindowViewModel();
            DataContext = _viewModel;

            InitializeComponent();

            flyoutDemo = new FlyoutDemo();
            flyoutDemo.ApplyTemplate();
            flyoutDemo.Closed += (o, e) => flyoutDemo = null;

            Closing += (s, e) =>
            {
                if (!e.Cancel && flyoutDemo != null)
                {
                    flyoutDemo.Dispose();
                }
            };
        }