Which namespace/DLL to use for ValueConversion in SL4

我是研究僧i 提交于 2019-12-13 07:15:06

问题


I am converting a SL3 application to SL4 and facing some issues.

Can anyone provide me the namespace or DLL name for ValueConversion.

I am getting error on the following statement.

[ValueConversion(typeof(ToolType), typeof(bool))]

Thanks for sharing your time.


回答1:


This class is not part of Silverlight Runtime Classes now. it was there in System.Windows.Data namespace before. Ref: http://msdn.microsoft.com/en-us/library/system.windows.data.valueconversionattribute.aspx

you can use IValueConverter interface as before.




回答2:


I use the following implementation in ClipFlair Studio: http://ClipFlair.codeplex.com (see Client/Helpers/WPF_Compatibility/WPF_Compatibility.Silverlight project at the sourcecode)



来源:https://stackoverflow.com/questions/8692324/which-namespace-dll-to-use-for-valueconversion-in-sl4

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