Anyone have a DataStateSwitchBehavior for WPF4?
Asked Answered
U

2

0

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!

Ulmaceous answered 17/10, 2010 at 22:9 Comment(0)
A
0

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.

Antiparticle answered 17/10, 2010 at 23:19 Comment(2)
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?Ulmaceous
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 answerAntiparticle
A
0

Not sure if DataStateSwitchBehavior for WPF4 specifically will work with it, but there's an updated version on CodePlex submitted by a user: http://expressionblend.codeplex.com/workitem/8148

See this blog post for more info (basically in SL4's case it was a binding workaround which neither work nor is needed now): http://blog.thekieners.com/2010/11/09/expression-blend-samples-not-working-with-silverlight-4-and-wpf-4/

Adjacent answered 4/2, 2011 at 23:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.