Custom Markup Extensions

Custom markup extensions are useful in scenarios where you need the extension to provide functionality or behavior that is beyond the scope of existing built-in markup extensions.

In earlier versions of Silverlight, you could not create custom markup extensions, but Silverlight 5 added support for them. You create a custom markup extension by extending the MarkupExtension class or the IMarkupExtension interface.

One of the biggest issues in data binding with Silverlight is that there is no support for an ObjectDataProvider class. In some instances, such as when binding to XML data, the lack of support for this class proves to be a huge drawback.

Until Silverlight 5, for example, there was no way to write something like the ...

Get XAML Developer Reference 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.