Chapter 11, Exploring Advanced Topics
- To modify the appearance of a control based on its state, such as whether or not it has the focus.
- In the XAML, add a
DataTemplateSelector
to indicate the potential templates and then add a class that derives fromDataTemplateSelector
that overridesOnSelectTemplate
and returnsDataTemplate
to be displayed. - We have seen the
EventToCommand
behavior, which allows you to add commands to controls that only have events, allowing you to handle the event/command inViewModel
. - You add setters with the property to change and the value to set it to.