(X) Hide this Watch the recordings of our recent webinars: Switch or no switch: Can I build my business apps in LightSwitch and Switching on the Cloud for Silverlight by Gill Cleeren
Our next webinar is on May 11th: Getting started with the Silverlight 5 Beta. Join it!
Skip Navigation LinksHome / News / View News

Create WPF's {x:Static} MarkupExtension in Silverlight 5

+ Add to SilverlightShow Favorites
0 comments   /   posted by Stephane LOUGE on Apr 21, 2011
(0 votes)
SilverlightShow Page for all Silverlight and Windows Phone 7 (WP7) things on TwitterStéphane Louge has a blog post that gives some tips for creating the WPF's like {x:Static} MarkupExtension using Silverlight 5.

Source: Stef's Blog

Silverlight 5 Beta now provides the MarkupExtension base class. By implementing the ProvideValue (IServiceProvider) method you can define a customized MarkupExtension, which can be interpreted by the Silverlight 5 XAML parser. 
This allows us to perform tasks that are not possible, rather wordy or too complex to implement. 
For example we can now create behaviors similar as the ones present in WPF like {x:Type ...}, {x:Static ...}, etc. 
In this post we will see how to achieve an equivalent of WPF's {x:Static} MarkupExtension.

Note: This blog post is in French!

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 8 and 8 and type the answer here: