开发者

Multiple Control Templates for a custom control in Silverlight

开发者 https://www.devze.com 2022-12-24 18:51 出处:网络
I am creating a custom control. The contents of the control will differ a lot when in different visual states.

I am creating a custom control. The contents of the control will differ a lot when in different visual states.

Can I to achieve the above, apply different control templates to the same custom control? That is define more than one control template for a custom control? If not, any clues as to how I can do this, without have as开发者_运维知识库 many custom/user controls as there are states?


You could define visual states inside a single ControlTemplate and also transitions between those states. Look for 'VisualStateManager'.

0

精彩评论

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