Skip Navigation LinksHome / Tips / View Tip

Tip: How to find the styles and templates of a standard control?

+ Add to SilverlightShow Favorites
0 comments   /   posted by Denislav Savkov on Sep 18, 2008
(0 votes)
Categories: Styles and Templates

Changing the default style or template of a control from the standard library is the same as with any other control. Except to create your own style it is good to know the parts and the states that compose the standard style. Microsoft has released the full XAML of a number of controls along with description of their visual states and state groups - Control Styles and Templates. Additionally using the reflector you can extract the styles of some slightly different controls, we did that and uploaded the generic.xaml file for you. Lastly, in the Reflector you can see the states and parts of every control  listed on the first line of the page. See how to disassemble Silverlight assemblies here.

 

ListBox has only one visual part - ScrollViewer.

 

Here you see two of the six Button visual states.

 That's it!

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 1 and 8 and type the answer here:

Join the free SilverlightShow webcast 'Running Silverlight Outside the Browser and with Elevated Trust'. Sept 7th, 8 am - 9 am PDT.
In this live session Chris Anderson will cover configuring and debugging OOB mode, toast notifications, elevated trust, direct file access and much more.
Learn more | Register | See more webinars (hide this)