3 using System.Windows.Controls.Primitives;
4 using System.Windows.Input;
5 using System.Windows.Markup;
7 namespace SiliconStudio.Presentation.Controls.
Commands
20 ClearSelectionCommand =
new RoutedCommand(
"ClearSelectionCommand", typeof(Selector));
21 CommandManager.RegisterClassCommandBinding(typeof(Selector),
new CommandBinding(ClearSelectionCommand, OnClearSelectionCommand));
27 public static RoutedCommand ClearSelectionCommand {
get;
private set; }
29 private static void OnClearSelectionCommand(
object sender, ExecutedRoutedEventArgs e)
31 var selector = sender as Selector;
34 selector.SelectedItem = null;
This class provides an instance of all commands in the namespace SiliconStudio.Presentation.Controls.Commands. These instances can be used in XAML with the StaticExtension markup extension.