WPF templating difference between triggers and visualStateManager
Asked Answered
N

1

7

I would like to know what difference is between triggers and visualStateManager. I am templating ComboBox and on the official MSDN sites (http://msdn.microsoft.com/en-us/library/ms752094.aspx) they are using VisualStateManager for changing colors of selected comboboxitem. But the same you can do with triggers.
Is there some differences between?? For example VisualStateManager will be "quicklier" or i dont know. And i would like to know what is better to use.

I am noob in templating and i dont understand it too much, so what i can use right now is triggers (that i understand), but VisualStateManager and some storyboards are big unknow for me right now.

Narcis answered 19/4, 2013 at 11:15 Comment(2)
Originally VisualStateManager was included in Silverlight, then it was added into WPF at a later time. Here is a good explanation of the different philosophies: hestia.typepad.com/flatlander/2008/06/why-the-silverl.html and here ... blogs.msdn.com/b/wpfsdk/archive/2009/02/27/… . For a "noob"...VSM and States are probably easier to follow and design with in Expression Blend.Simonize
And the functionality is a same?Narcis
D
0

Due to the fact that our programming world tries to separate concerns between people, we can conclude that VisualStateManager is really useful tool to make a clear separation of responsibilities.

There is a distinct separation of responsibilities: the control author specifies what the visual states of a control are and determines when a control goes into each visual state; the template author specifies what the control looks like in each visual state.

see this article

Dory answered 15/4, 2014 at 12:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.