Exemple #1
0
        private static void UndoCommand_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            //e.CanExecute = previousColor.HasValue;
            ColorUserControl colorUserControl = (ColorUserControl)sender;

            e.CanExecute = colorUserControl.previousColor.HasValue;
        }
Exemple #2
0
        private static void UndoCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            //this.Color = (Color) previousColor;
            ColorUserControl colorUserControl = (ColorUserControl)sender;
            Color            currentColor     = colorUserControl.Color;

            colorUserControl.Color = (Color)colorUserControl.previousColor;
        }