.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> Silverlight >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Custom Markup Extensions in Silverlight 5 - Part 1

Posted By:Mahadesh Mahalingappa       Posted Date: August 19, 2011    Points: 200    Category: Silverlight    URL: http://www.dotnetspark.com  

In this article we are going to learn about the Custom Markup Extensions in Silverlight 5
 

  
Custom Markup Extensions in Silverlight 5  - Part 1:

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

 

 





 
Lets have a look at how the Interface ImarkupExtension looks:
 




Lets add the namespace for the local project .
 


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 :


 
 

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend