In this article we are going to learn about the Custom Markup Extensions in
Silverlight 5 .
Created a new project SLCustomMarkup . Make sure that the Targeted Silverlight
Version is Silverlight 5 .
Create a class say FirstCME
Lets start typing in the code . I implement the interface IMarkupExtension<T>
Lets have a look at how the Interface ImarkupExtension<T> looks:
Lets now add a TextBlock and bind the text of it to FirstCME Extension which we
had created .
The Silverlight parser creates a instance of FirstCME and assigns the value of
the property to the Text of the TextBlock .
Now we are done . Lets give it a run :
C# Corner. All contents are copyright of their authors.