Markup Extensions
Markup extensions, like type converters, enable you to extend the expressiveness of XAML. Both can turn a string attribute value into an appropriate object based on the string. As with type converters, several are built into each XAML-based framework, and you cannot create your own markup extensions unless you’re using the .NET Framework.
Unlike type converters, however, markup extensions are invoked from XAML with explicit and consistent syntax. In addition, using markup extensions enables you to overcome potential limitations in existing type converters that you don’t have the power to change. For example, if you want to set a control’s background to a fancy gradient brush with a simple string value, you can write a custom ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access