#1,199 - Complete WPF Command Example

added by DotNetKicks
2/6/2017 2:53:44 PM

1 Kicks, 389 Views

Below is a cheat sheet for creating a custom command in WPF. Use a static property to expose a command object from the ViewModel or code-behind. RoutedUICommand allows for associating control text with the command itself. Add command handlers (in code-behind or ViewModel). Bind the command to its handlers, done here in XAML for a window.


0 comments