wpf----命令(Command)
2021-03-04 18:26
标签:data cti control class stat span key command out 一,自定义命令: 1创建一个类的静态RoutedUICommand对象.并且在类初始化中创建该静态对象. 本实列创建了该类和类中的静态对象. (注意,是类的一个静态属性). 2,使用该命令: wpf----命令(Command) 标签:data cti control class stat span key command out 原文地址:https://www.cnblogs.com/frogkiller/p/12928291.html 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; }
}
}
文章标题:wpf----命令(Command)
文章链接:http://soscw.com/index.php/essay/60103.html