示例#1
0
        void FileButton_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            FileButton f = sender as FileButton;

            if (f.Tag != null)
            {
                DiagramFrontPage fp = f.Tag as DiagramFrontPage;
                (fp.DataContext as DiagramCommonViewModel).ItemClick.Execute(this.DataContext as FileItem);
            }
        }
示例#2
0
        private static void OnUMLViewModelChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DiagramFrontPage front = d as DiagramFrontPage;

            if (e.NewValue == null)
            {
                return;
            }

            front.DiagramCommonViewModel.ItemClick = new DelegateCommand <object>(front.ItemClicked);
        }