Exemplo n.º 1
0
        private static void OnCommandChanged(DependencyObject button, SliderCommand oldCommand, SliderCommand newCommand)
        {
#if !SILVERLIGHT
            var repeatButton = button as RepeatButton;
            if (repeatButton != null)
            {
                repeatButton.Command = GetCommand(newCommand);
            }
#endif
        }
Exemplo n.º 2
0
        private static RoutedCommand GetCommand(SliderCommand scrollBarCommand)
        {
            switch (scrollBarCommand)
            {
            case SliderCommand.DecreaseLarge:
                return(System.Windows.Controls.Slider.DecreaseLarge);

            case SliderCommand.IncreaseLarge:
                return(System.Windows.Controls.Slider.IncreaseLarge);

            default:
                return(null);
            }
        }
Exemplo n.º 3
0
 public static void SetCommand(DependencyObject element, SliderCommand value)
 {
     element.SetValue(CommandProperty, value);
 }