views:

445

answers:

1

This really relates to creating a library that works across both WPF and Silverlight. The WPF Toolkit includes an implementation of the VisualStateManager included with Silverlight, and if the VisualStateManager can do what the MultiTrigger in WPF does, that solves my problem.

I just found an article on MSDN Blogs discussing the use of VisualStateManager and Triggers, but I'm still not sure whether or not VisualStateManager can be used as a replacement for MultiTriggers.

+3  A: 

The VisualStateManager cannot completely replace WPF's MultiTrigger. WPF's MultiTrigger has built-in support for conditions. The VisualStateManager only supports states. While states may seem like conditions at first glimpse, this is not entirely true. For instance, in WPF you could use a MultiTrigger that only runs if the content of a Button says "OK". However, this is not really a button state, because of this, the VisualStateManager cannot be used in this situation.

I hope this is helpful, Chad Campbell - Author of Silverlight 2 in Action

Chad Campbell