wpfcommandshortcutrouted-events

What is a shortcut key to create Command or Routed Event?


For example, the shortcut key to create Dependency Property or Attached Property is Ctrl + K + X.

If then, What is the shortcut key to create Command or Routed Event?

Thank you for reading.


Solution

  • Here is a list of all code snippets in VS 2019:

    https://learn.microsoft.com/de-de/visualstudio/ide/visual-csharp-code-snippets?view=vs-2019

    As you can see, there are none of the snippets available specifically for your purpose. However, you can write quickly your own, like this guy: http://interactiveasp.net/blogs/natesstuff/archive/2008/10/15/routed-event-code-snippet.aspx did.

    Or, if you using the Prism framework, you can download the template pack (https://marketplace.visualstudio.com/items?itemName=BrianLagunas.PrismTemplatePack) that contain some snippets for e.g. a DelegateCommand.