开发者

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

开发者 https://www.devze.com 2022-12-23 07:24 出处:网络
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.

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

精彩评论

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

关注公众号