December 2014
Intermediate to advanced
512 pages
17h 4m
English
There’s a bit of a problem with the custom template in Figure 18.4. Any Button it is applied to will look the same, no matter what the values of its properties are. Most notably, the right Button in Figure 18.4 has "With Custom Template" as its content, but it never gets displayed. If you’re creating a control template that’s meant to be broadly reusable, you need to do some work to respect various properties of the target control (sometimes called the templated parent).
The key to inserting property values from the target element inside a control template is a specialized form of data binding. You can set a property to the markup extension value:
{TemplateBinding ...
Read now
Unlock full access