Shawn Wildermuth

Author, Teacher, and Filmmaker
.NET Foundation Board Member

WPF Command Example


Url: http://wilderminds.blob.core.windows.net/downloads/commandexample.zip

I've worked up a simple example of how to use Commands in WPF.  This example includes:

  • Creating custom Commands
  • Using built-in and custom Commands in XAML
  • Shows how to use Commands in menus, toolbars, buttons and context menus
  • Shows how the CanExecute call back is used to enable/disable multiple XAML elements that are tied to the same Command
  • Shows how to use Parameterized Commands

Please let me know what you think of the sample.