//public RoutedCommand NavigateCommand //{ // get { return (RoutedCommand)GetValue(NavigateCommandProperty); } // set { SetValue(NavigateCommandProperty, value); } //} public MainWindow() { InitializeComponent(); //this.NavigateCommand = new RoutedCommand(); //var commandBinding = new CommandBinding(this.NavigateCommand); //commandBinding.Executed += commandBinding_Executed; //this.CommandBindings.Add(commandBinding); this.Loaded += MainWindow_Loaded; _view = CollectionViewSource.GetDefaultView(App.CurrentApp.Animations); _view.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending)); _view.CurrentChanged += new EventHandler(view_CurrentChanged); CurrentAnimation.ObjectType = null; AnimationsDataSource.ObjectType = null; AnimationsDataSource.ObjectInstance = App.CurrentApp.Animations; _mainWindow = this; _diagramSetting = new DiagramSetting(); DiagramSize = new Size(800, 600); }
private void btnSetting_Click(object sender, RoutedEventArgs e) { _diagramSetting = new DiagramSetting(); _diagramSetting.ShowDialog(); }