Number8
Number8

Reputation: 12870

Concatenate styles in SL 4 / WPF?

How can I use several styles on a control?
For example, I have a style that defines the size and margins for buttons, and several styles that define different color schemes. I would like to use the sizing style and a colors style on one control.

Any hints are appreciated...
Thanks.

Upvotes: 1

Views: 82

Answers (1)

AnthonyWJones
AnthonyWJones

Reputation: 189457

In Silveright you can't combine multiple styles and apply them to a control. The closest that you can natively get is the Style BasedOn property where you can take an existing Style and extend it with additional setters. However there is no simple way to declarively (or even dynamically) combine two or more existing Styles to create a "combined" style.

Upvotes: 1

Related Questions