tags:

views:

27

answers:

1

Does anyone have a working WPF4 version of the DataStateSwitchBehavior? This was part of the Expression Blend Samples for Siverlight at: http://expressionblend.codeplex.com/wikipage?title=Behaviors%20and%20Effects&referringTitle=Documentation

Thanks!

A: 

If you download the source from the codeplex link that you mentioned, it also includes source for WPF. It is version 3.5, but that shouldn't be a huge deal.

If you only want the DataStateSwitchBehavior, you can start a new project, add the source files :

BindingListener.cs ConverterHelper.cs DataStateSwitchBehavior.cs GoToState.cs

and add a reference to the Blend dlls. It compiles and works.

JoshVarga
Thanks Josh, but have you actually gotten it to work? Perhaps I just don't understand how it's meant to be used, but I can't get it to work (it does compile though). I've seen other comments online about it not working in WPF so I'm not alone.There are no WPF samples using it and the ones for Silverlight don't work just borrowing the XAML. Could you post a sample section of XAML that's working for you?
Scott Bussinger
I tried running that code in WPF and although it compiles it does have some problems. I am going to look at the code and hopefully get you an answer
JoshVarga