Anyone have a DataStateSwitchBehavior for WPF4?

时光毁灭记忆、已成空白 提交于 2019-12-25 11:56:35

问题


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!


回答1:


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.




回答2:


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/



来源:https://stackoverflow.com/questions/3955516/anyone-have-a-datastateswitchbehavior-for-wpf4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!