本文整理汇总了C#中System.Windows.Controls.ListView.AddCommandBinding方法的典型用法代码示例。如果您正苦于以下问题:C# ListView.AddCommandBinding方法的具体用法?C# ListView.AddCommandBinding怎么用?C# ListView.AddCommandBinding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.ListView
的用法示例。
在下文中一共展示了ListView.AddCommandBinding方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeCommandShortcuts
static void InitializeCommandShortcuts(ListView listView) {
listView.AddCommandBinding(ApplicationCommands.Copy, new CallStackCtxMenuCommandProxy(new CopyCallStackCtxMenuCommand()));
listView.AddCommandBinding(new CallStackCtxMenuCommandProxy(new RunToCursorCallStackCtxMenuCommand()), ModifierKeys.Control, Key.F10);
listView.InputBindings.Add(new KeyBinding(new CallStackCtxMenuCommandProxy(new GoToSourceCallStackCtxMenuCommand()), Key.Enter, ModifierKeys.None));
listView.InputBindings.Add(new KeyBinding(new CallStackCtxMenuCommandProxy(new GoToSourceNewTabCallStackCtxMenuCommand()), Key.Enter, ModifierKeys.Control));
listView.InputBindings.Add(new KeyBinding(new CallStackCtxMenuCommandProxy(new GoToSourceNewTabCallStackCtxMenuCommand()), Key.Enter, ModifierKeys.Shift));
}
示例2: InitializeCommandShortcuts
static void InitializeCommandShortcuts(ListView listView) {
listView.AddCommandBinding(ApplicationCommands.Copy, new BreakpointCtxMenuCommandProxy(new CopyBreakpointCtxMenuCommand()));
listView.AddCommandBinding(ApplicationCommands.Delete, new BreakpointCtxMenuCommandProxy(new DeleteBreakpointCtxMenuCommand()));
listView.InputBindings.Add(new KeyBinding(new BreakpointCtxMenuCommandProxy(new GoToSourceBreakpointCtxMenuCommand()), Key.Enter, ModifierKeys.None));
listView.InputBindings.Add(new KeyBinding(new BreakpointCtxMenuCommandProxy(new GoToSourceNewTabBreakpointCtxMenuCommand()), Key.Enter, ModifierKeys.Control));
listView.InputBindings.Add(new KeyBinding(new BreakpointCtxMenuCommandProxy(new GoToSourceNewTabBreakpointCtxMenuCommand()), Key.Enter, ModifierKeys.Shift));
listView.InputBindings.Add(new KeyBinding(new BreakpointCtxMenuCommandProxy(new ToggleEnableBreakpointCtxMenuCommand()), Key.Space, ModifierKeys.None));
}
示例3: InitializeCommandShortcuts
static void InitializeCommandShortcuts(ListView listView) {
listView.AddCommandBinding(ApplicationCommands.Copy, new ModulesCtxMenuCommandProxy(new CopyCallModulesCtxMenuCommand()));
listView.InputBindings.Add(new KeyBinding(new ModulesCtxMenuCommandProxy(new GoToModuleModulesCtxMenuCommand()), Key.Enter, ModifierKeys.None));
listView.InputBindings.Add(new KeyBinding(new ModulesCtxMenuCommandProxy(new GoToModuleNewTabModulesCtxMenuCommand()), Key.Enter, ModifierKeys.Control));
listView.InputBindings.Add(new KeyBinding(new ModulesCtxMenuCommandProxy(new GoToModuleNewTabModulesCtxMenuCommand()), Key.Enter, ModifierKeys.Shift));
listView.InputBindings.Add(new KeyBinding(new ModulesCtxMenuCommandProxy(new ShowInMemoryModulesCtxMenuCommand()), Key.X, ModifierKeys.Control));
for (int i = 0; i < Memory.MemoryControlCreator.NUMBER_OF_MEMORY_WINDOWS && i < 10; i++)
listView.InputBindings.Add(new KeyBinding(new ModulesCtxMenuCommandProxy(new ShowInMemoryWindowModulesCtxMenuCommand(i + 1)), Key.D0 + (i + 1) % 10, ModifierKeys.Control));
}
示例4: InitializeCommandShortcuts
static void InitializeCommandShortcuts(ListView listView) {
listView.AddCommandBinding(ApplicationCommands.Copy, new LocalsCtxMenuCommandProxy(new CopyLocalsCtxMenuCommand()));
listView.InputBindings.Add(new KeyBinding(new LocalsCtxMenuCommandProxy(new EditValueLocalsCtxMenuCommand()), Key.F2, ModifierKeys.None));
listView.InputBindings.Add(new KeyBinding(new LocalsCtxMenuCommandProxy(new CopyValueLocalsCtxMenuCommand()), Key.C, ModifierKeys.Control | ModifierKeys.Shift));
listView.InputBindings.Add(new KeyBinding(new LocalsCtxMenuCommandProxy(new ToggleCollapsedLocalsCtxMenuCommand()), Key.Enter, ModifierKeys.None));
}
示例5: InitializeCommandShortcuts
static void InitializeCommandShortcuts(ListView listView) {
listView.AddCommandBinding(ApplicationCommands.Copy, new LocalsCtxMenuCommandProxy(new CopyLocalsCtxMenuCommand()));
listView.InputBindings.Add(new KeyBinding(new LocalsCtxMenuCommandProxy(new EditValueLocalsCtxMenuCommand()), Key.F2, ModifierKeys.None));
listView.InputBindings.Add(new KeyBinding(new LocalsCtxMenuCommandProxy(new CopyValueLocalsCtxMenuCommand()), Key.C, ModifierKeys.Control | ModifierKeys.Shift));
listView.InputBindings.Add(new KeyBinding(new LocalsCtxMenuCommandProxy(new ToggleCollapsedLocalsCtxMenuCommand()), Key.Enter, ModifierKeys.None));
listView.InputBindings.Add(new KeyBinding(new LocalsCtxMenuCommandProxy(new ShowInMemoryLocalsCtxMenuCommand()), Key.X, ModifierKeys.Control));
for (int i = 0; i < Memory.MemoryControlCreator.NUMBER_OF_MEMORY_WINDOWS && i < 10; i++)
listView.InputBindings.Add(new KeyBinding(new LocalsCtxMenuCommandProxy(new ShowInMemoryWindowLocalsCtxMenuCommand(i + 1)), Key.D0 + (i + 1) % 10, ModifierKeys.Control));
}
示例6: InitializeCommandShortcuts
static void InitializeCommandShortcuts(ListView listView)
{
listView.AddCommandBinding(ApplicationCommands.Copy, new ModulesCtxMenuCommandProxy(new CopyCallModulesCtxMenuCommand()));
listView.InputBindings.Add(new KeyBinding(new ModulesCtxMenuCommandProxy(new GoToModuleModulesCtxMenuCommand()), Key.Enter, ModifierKeys.None));
listView.InputBindings.Add(new KeyBinding(new ModulesCtxMenuCommandProxy(new GoToModuleNewTabModulesCtxMenuCommand()), Key.Enter, ModifierKeys.Control));
listView.InputBindings.Add(new KeyBinding(new ModulesCtxMenuCommandProxy(new GoToModuleNewTabModulesCtxMenuCommand()), Key.Enter, ModifierKeys.Shift));
}
示例7: InitializeCommandShortcuts
static void InitializeCommandShortcuts(ListView listView) {
listView.AddCommandBinding(ApplicationCommands.Copy, new ModulesCtxMenuCommandProxy(new CopyCallModulesCtxMenuCommand()));
}
示例8: InitializeCommandShortcuts
static void InitializeCommandShortcuts(ListView listView) {
listView.AddCommandBinding(ApplicationCommands.Copy, new ThreadsCtxMenuCommandProxy(new CopyCallThreadsCtxMenuCommand()));
listView.InputBindings.Add(new KeyBinding(new ThreadsCtxMenuCommandProxy(new SwitchToThreadThreadsCtxMenuCommand()), Key.Enter, ModifierKeys.None));
listView.InputBindings.Add(new KeyBinding(new ThreadsCtxMenuCommandProxy(new SwitchToThreadNewTabThreadsCtxMenuCommand()), Key.Enter, ModifierKeys.Control));
listView.InputBindings.Add(new KeyBinding(new ThreadsCtxMenuCommandProxy(new SwitchToThreadNewTabThreadsCtxMenuCommand()), Key.Enter, ModifierKeys.Shift));
}