Summary

The combination of styles, templates, and visual states is powerful and often confusing to someone learning about XAML. Adding to the confusion is the fact that styles can (and often do) contain templates, and elements in templates all have their own syles (whether marked explicitly or inherited implicitly).

These mechanisms are so powerful, in fact, that often you can restyle an existing control as an alternative to writing your own custom control. This is great news, because restyling an existing control is usually significantly easier than writing a new control, and it can perhaps be done entirely by a graphic designer rather than a programmer.

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.