当前位置: 首页>>代码示例>>C#>>正文


C# ListView.AddCommandBinding方法代码示例

本文整理汇总了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));
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:7,代码来源:CallStackControl.xaml.cs

示例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));
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:8,代码来源:BreakpointsControl.xaml.cs

示例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));
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:9,代码来源:ModulesControl.xaml.cs

示例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));
		}
开发者ID:nakijun,项目名称:dnSpy,代码行数:6,代码来源:LocalsControl.xaml.cs

示例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));
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:9,代码来源:LocalsControl.xaml.cs

示例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));
 }
开发者ID:LiangChow,项目名称:dnSpy,代码行数:7,代码来源:ModulesControl.xaml.cs

示例7: InitializeCommandShortcuts

		static void InitializeCommandShortcuts(ListView listView) {
			listView.AddCommandBinding(ApplicationCommands.Copy, new ModulesCtxMenuCommandProxy(new CopyCallModulesCtxMenuCommand()));
		}
开发者ID:nakijun,项目名称:dnSpy,代码行数:3,代码来源:ModulesControl.xaml.cs

示例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));
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:6,代码来源:ThreadsControl.xaml.cs


注:本文中的System.Windows.Controls.ListView.AddCommandBinding方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。