//void MainWindow_MouseDown(object sender, MouseButtonEventArgs e)
        //{
        //    if (e.RightButton == MouseButtonState.Pressed)
        //    {
        //        if (bar.Visibility == Visibility.Visible)
        //        {
        //            bar.Visibility = Visibility.Collapsed;
        //        }
        //        else
        //        {
        //            bar.Visibility = Visibility.Visible;
        //        }
        //    }
        //    else
        //    {
        //        bar.Visibility = Visibility.Collapsed;
        //    }
        //}

        //void MainWindow_MouseUp(object sender, MouseButtonEventArgs e)
        //{
        //    bar.Visibility = Visibility.Collapsed;
        //}

        //private void Close(object sender, RoutedEventArgs e)
        //{
        //    this.Close();
        //    bar.Visibility = Visibility.Collapsed;
        //}
        private async void OnGoBack(object parameter)
        {
            //await (this.FindName("diagram1") as Diagram).SaveAs(null);
            UMLViewModel VM = this.DataContext as UMLViewModel;

            VM.GoBack        = null;
            this.DataContext = null;
        }
Beispiel #2
0
        public MainPage()
        {
            this.InitializeComponent();
            UMLViewModel VM = new UMLViewModel();

            VM.GoBack        = new DelegateCommand <object>(OnGoBack);
            this.DataContext = VM;
        }
        public MainWindow()
        {
            InitializeComponent();

            UMLViewModel VM = new UMLViewModel();

            VM.GoBack        = new DelegateCommand <object>(OnGoBack);
            this.DataContext = VM;
            //this.MouseDown += MainWindow_MouseDown;
        }