Does anyone have a working WPF4 version of the DataStateSwitchBehavi开发者_C百科or? This was part of the Expression Blend Samples for Siverlight at: http://expressionblend.codeplex.com/wikipage?title=Behaviors%20and%20Effects&referringTitle=Documentation
Thanks!
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.
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/
精彩评论