(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

Tip: What are the differences in the styles system between Silverlight and WPF?

(0 votes)
Denislav Savkov
>
Denislav Savkov
Joined Feb 11, 2008
Articles:   14
Comments:   6
More Articles
1 comments   /   posted on Sep 18, 2008
Categories:   General

These are the differences:

  • Is it possible to apply a style to all elements in your application?

Unforunately, the Beta 2 does not support implicit styles using the TargetType attribute like WPF. To apply a style to all elements you must explicitly set a value to each Style property.

  • Is it possible to extend a style?

In Silverlight styles cannot be based on other styles. In WPF that is possible using the BasedOn attribute

  • Is it possible to change the style of a control more than once?

No. Styles can be set only once in Silverlight in XAML or in code. After applying a style it is possible to change individual control properties though. You can affect the appearance of a control by changing the Template property and you can do that as many times as you want.

That's it!


Subscribe

Comments

  • -_-

    RE: Tip: What are the differences in the styles system between Silverlight and WPF?


    posted by rama charan on May 30, 2010 20:06

     

    its now possible to use BasedOn attribute

    http://www.silverlightshow.net/tips/Tip-Cascading-Styles-in-Silverlight-3.aspx

Add Comment

Login to comment:
  *      *       
Login with Facebook