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 }
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); } }
public static void SetCommand(DependencyObject element, SliderCommand value) { element.SetValue(CommandProperty, value); }