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); } }
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); }