开发者

How do I base a style on a Silverlight toolkit theme style

I've being trying to add a theme from the Silverlight toolkit to a project. In the project there are a number of existing styles used in the layout.

The problem is when any control ha开发者_运维技巧s an explict style applied to it does not receive any attributes of the style from the theme.

In WPF I would use something like BasedOn={StaticResource {x:Type TextBox}}, but this is not supported in Silverlight.

I've considered going through the theme and setting a key for every style and then using BasedOn to create both an implicit style to use with the ImplictStyleManager, as well as another explicit style for use with the existing styled controls.

Have you got any better ideas?


This is tough to do, your recommendation of setting keys for all styles, then using BasedOn, is the best route in my opinion.

Sorry it isn't easier!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜