开发者

Difference In Visual State and Triggers

I have read somewhere that Silverlight is subset of WPF , then why triggers are not used in the silverlight and t开发者_如何学运维he States are used. what is difference between these two, Why not the triggers are used in silverlight 3.0


Why are triggers not implemented in Silverlight? Ultimately, resource constraints. The Silverlight team were working on a very compressed delivery cycle, and chose to implement the VisualStateManager instead of triggers, because they felt that VSM delivered most of what they needed, and would be much cheaper to implement than the full WPF trigger system.

What's the difference between them? Triggers are under the control of the template designer: they allow the designer of a (say) Button template to factor in whatever crazy UI states they're interested in. States are under the control of the control author: the control author has to anticipate which events are important to the display of the control, and assemble these into states.

This article expands on the differences: the article itself argues for the triggers approach, but the comments from John Gossman and Christian Schormann put the case for states.


Because silverlight is SUBSET of wpf. SL doesnt have this feature, as it doesnt have many others.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜