本文整理汇总了C#中System.Windows.Input.RoutedUICommand类的典型用法代码示例。如果您正苦于以下问题:C# RoutedUICommand类的具体用法?C# RoutedUICommand怎么用?C# RoutedUICommand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RoutedUICommand类属于System.Windows.Input命名空间,在下文中一共展示了RoutedUICommand类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShareOnFacebookCommand
static ShareOnFacebookCommand()
{
InputGestureCollection gestures = new InputGestureCollection();
gestures.Add(new KeyGesture(Key.F, ModifierKeys.Control | ModifierKeys.Shift));
ShareOnFacebook = new RoutedUICommand("Share on Facebook", "Share on Facebook", typeof(ShareOnFacebookCommand), gestures);
}
示例2: Commands
static Commands()
{
// Initialize the commands
InputGestureCollection inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.F, ModifierKeys.Control | ModifierKeys.Shift, "Ctrl+Shift+F"));
addFolderEntity = new RoutedUICommand("Add Folder", "AddFolder", typeof(Commands), inputs);
inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.L, ModifierKeys.Control | ModifierKeys.Shift, "Ctrl+Shift+L"));
addFileEntity = new RoutedUICommand("Add File", "AddFile", typeof(Commands), inputs);
inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.Delete, ModifierKeys.Control, "Ctrl+Del"));
removeEntity = new RoutedUICommand("Remove Entity", "RemoveEntity", typeof(Commands), inputs);
inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.Delete, ModifierKeys.Control | ModifierKeys.Shift, "Ctrl+Shift+Del"));
removeAllEntities = new RoutedUICommand("Remove All Entities", "RemoveAllEntities", typeof(Commands), inputs);
inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.F7, ModifierKeys.None, "F7"));
buildPackage = new RoutedUICommand("Build Package", "BuildPackage", typeof(Commands), inputs);
inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.F2, ModifierKeys.None, "F2"));
renameEntity = new RoutedUICommand("Rename Entity", "RenameEntity", typeof(Commands), inputs);
}
示例3: SimpleRoutedCommand
public SimpleRoutedCommand(string text)
{
RoutedUICommand routedCommand = new RoutedUICommand();
routedCommand.Text = text;
_routedCommand = routedCommand;
init();
}
示例4: HotkeyCommands
static HotkeyCommands()
{
InputGestureCollection inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.Q, ModifierKeys.Control, "Ctrl+Q"));
exit = new RoutedUICommand("Exit", "Exit", typeof(HotkeyCommands), inputs);
inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.D, ModifierKeys.Control, "Ctrl+D"));
remove = new RoutedUICommand("Remove desktop", "Remove desktop", typeof(HotkeyCommands), inputs);
inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.F, ModifierKeys.Control, "Ctrl+F"));
clear_all = new RoutedUICommand("Clear all", "Clear all", typeof(HotkeyCommands), inputs);
inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.G, ModifierKeys.Control, "Ctrl+G"));
clear_lan = new RoutedUICommand("Clear selected LAN", "Clear selected LAN", typeof(HotkeyCommands), inputs);
inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.T, ModifierKeys.Control, "Ctrl+T"));
set_stat_ip = new RoutedUICommand("Set static IP", "Set static IP", typeof(HotkeyCommands), inputs);
inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.U, ModifierKeys.Control, "Ctrl+U"));
unset_stat_ip = new RoutedUICommand("Unset static IP", "Unset static IP", typeof(HotkeyCommands), inputs);
inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.M, ModifierKeys.Control, "Ctrl+M"));
move_to = new RoutedUICommand("Move to", "Move to", typeof(HotkeyCommands), inputs);
inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.K, ModifierKeys.Control, "Ctrl+K"));
combine_lans = new RoutedUICommand("Combine LAN's", "Combine LAN's", typeof(HotkeyCommands), inputs);
}
示例5: WikiCommands
static WikiCommands()
{
createLinkFromSelection = new RoutedUICommand(
"Create Link from Selection",
"CreateLinkFromSelection",
typeof(WikiCommands));
}
示例6: AppCommands
static AppCommands()
{
TestCommand = new RoutedUICommand("", "TestCommand", typeof(AppCommands));
ApplyCommand = new RoutedUICommand("", "ApplyCommand", typeof(AppCommands));
CancelCommand = new RoutedUICommand("", "CancelCommand", typeof(AppCommands));
AvailablePortsCommand = new RoutedUICommand();
}
示例7: CustomerFormCommands
static CustomerFormCommands()
{
_closeTab = new RoutedUICommand("closeTab", "_closeTab", typeof(CustomerFormCommands));
_addNewCustomer = new RoutedUICommand("addNewCustomer", "addNewCustomer", typeof(CustomerFormCommands));
_delCustomer = new RoutedUICommand("deleteCustomer", "deleteCustomer", typeof(CustomerFormCommands));
_viewAllCustomers = new RoutedUICommand("viewAllCustomers", "viewAllCustomers", typeof(CustomerFormCommands));
}
示例8: ShowSettingsDialogCommand
static ShowSettingsDialogCommand()
{
InputGestureCollection gestures = new InputGestureCollection();
gestures.Add(new KeyGesture(Key.D3, ModifierKeys.Control));
ShowSettingsDialog = new RoutedUICommand("Settings", "Settings", typeof(ShowSettingsDialogCommand), gestures);
}
示例9: GlobalCommands
static GlobalCommands()
{
HyperlinkCommand = new RoutedUICommand("HyperlinkCommand", "HyperlinkCommand", typeof(GlobalCommands));
// Register CommandBinding for all windows.
CommandManager.RegisterClassCommandBinding(typeof(FrameworkElement), new CommandBinding(HyperlinkCommand, HyperlinkCommandExecuted, HyperlinkCommandCanExecute));
}
示例10: OrderByAuthor
static OrderByAuthor()
{
InputGestureCollection inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.A, ModifierKeys.Alt, "Alt+A"));
orderByAuthor = new RoutedUICommand(
"OrderByAuthorCmd", "OrderByAuthorCmd", typeof(OrderByAuthor), inputs);
}
示例11: OrderByTitle
static OrderByTitle()
{
InputGestureCollection inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.T, ModifierKeys.Alt, "Alt+T"));
orderByTitle = new RoutedUICommand(
"OrderByTitleCmd", "OrderByTitleCmd", typeof(OrderByTitle), inputs);
}
示例12: DataCommands
static DataCommands()
{
//// Инициализация команды.
InputGestureCollection inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.Escape, ModifierKeys.None, "Esc"));
escape = new RoutedUICommand(
"Escape", "Escape", typeof(DataCommands), inputs);
InputGestureCollection inputs2 = new InputGestureCollection();
inputs2.Add(new KeyGesture(Key.N, ModifierKeys.Control, "Ctr+N"));
newGame = new RoutedUICommand(
"NewGame", "NewGame", typeof(DataCommands), inputs2);
InputGestureCollection inputs3 = new InputGestureCollection();
inputs3.Add(new KeyGesture(Key.M, ModifierKeys.Control, "Ctr+M"));
mix = new RoutedUICommand(
"Mix", "Mix", typeof(DataCommands), inputs3);
InputGestureCollection inputs4 = new InputGestureCollection();
inputs4.Add(new KeyGesture(Key.S, ModifierKeys.Control, "Ctr+S"));
solve = new RoutedUICommand(
"Solve", "Solve", typeof(DataCommands), inputs4);
InputGestureCollection inputs5 = new InputGestureCollection();
inputs5.Add(new KeyGesture(Key.L, ModifierKeys.Control, "Ctr+L"));
loadPicture = new RoutedUICommand(
"LoadPicture", "LoadPicture", typeof(DataCommands), inputs5);
InputGestureCollection inputs6 = new InputGestureCollection();
inputs6.Add(new KeyGesture(Key.P, ModifierKeys.Control));
showSolution = new RoutedUICommand(
"ShowSolution", "ShowSolution", typeof(DataCommands), inputs6);
}
示例13: CustomCommands
static CustomCommands()
{
SplitSegmentCommand = new RoutedUICommand(
"Split Segment", "SplitSegment", typeof(CustomCommands), null);
JoinSegmentsCommand = new RoutedUICommand(
"Join Segments", "JoinSegments", typeof(CustomCommands), null);
}
示例14: Commands
static Commands()
{
Duplicate = new RoutedUICommand("Duplicate", "Duplicate", typeof(BackpackView));
Bank = new RoutedUICommand("Bank", "Bank", typeof(BackpackView));
CopyCode = new RoutedUICommand("Copy Code", "CopyCode", typeof(BackpackView));
Delete = new RoutedUICommand("Delete", "Delete", typeof(BackpackView));
}
示例15: DataCommands
static DataCommands()
{
InputGestureCollection inputs = new InputGestureCollection();
inputs.Add(new KeyGesture(Key.R, ModifierKeys.Control, "Ctrl+R"));
requery = new RoutedUICommand(
"Requery", "Requery", typeof(DataCommands), inputs);
}