Exemplo n.º 1
0
        private static void binding_Executed(
            object sender,
            ExecutedRoutedEventArgs e)
        {
            // Increment the value of Total when
            // the command is executed
            PageNumberControl control = (PageNumberControl)sender;

            control.Total++;
        }
Exemplo n.º 2
0
        static void binding_CanExecute(
            object sender,
            CanExecuteRoutedEventArgs e)
        {
            // The command can execute as long as the
            // Total is less than the maximum integer value
            PageNumberControl control = (PageNumberControl)sender;

            e.CanExecute = control.Total < int.MaxValue;
        }