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 :
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: