Handling standard commands in a user control
A typical user control exposes properties and events, but it can also handle commands. These can be standard
RoutedUICommands defined by WPF) or custom commands exposed as properties and invoked by the control. In this recipe, we'll see how to add command handling to a user control.
We'll use the projects we created in the previous recipe, Creating a user control, so make sure the solution is open.
How to do it...
We'll add handling for the standard
ChannelUp will increase each of the RGB values and
will decrease them.
ColorPicker.xaml.cs. Add a static constructor to the class that registers for command ...