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>
here .





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 :

Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.
Shalini JunejaPosted Aug 22, 2011, 4:13 AM
Good Article............