标签:data cti control class stat span key command out
一,自定义命令:
1创建一个类的静态RoutedUICommand对象.并且在类初始化中创建该静态对象. 本实列创建了该类和类中的静态对象.
public class DataCommands { private static RoutedUICommand requery; static DataCommands() { InputGestureCollection inputs = new InputGestureCollection(); inputs.Add(new KeyGesture(Key.R, ModifierKeys.Control, "Ctrl+R")); requery = new RoutedUICommand( "Requery", "Requery", typeof(DataCommands), inputs); } public static RoutedUICommand Requery { get { return requery; } } }
(注意,是类的一个静态属性).
2,使用该命令:
标签:data cti control class stat span key command out
原文地址:https://www.cnblogs.com/frogkiller/p/12928291.html