Recommended

Skip Navigation LinksHome / Tips / View Tip

Tip: How to get the root element of a Silverlight application?

+ Add to SilverlightShow Favorites
0 comments   /   posted by Denislav Savkov on Aug 29, 2008
(0 votes)
Categories: Controls and UI

System.Windows.Application is a special class dedicated to the application. Using it you can get a few useful references one of which is the RootVisual.

C#

UIElement applicationRoot = Application.Current.RootVisual;

That's it!

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 7 and 8 and type the answer here:

Help us make SilverlightShow even better. Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to hear from you! Need material (article, tutorial, or other) on a specific topic? Let us know and SilverlightShow content authors will work to have that prepared for you. (hide this)