且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在编写wpf界面时候中出现如下错误: 类型引用不明确。至少有两个名称空间(“System.Windows”和“System.Windows”)中已出现名为“VisualStateManager”的类型。请考虑调整程序集 XmlnsDefinition 特性。

更新时间:2022-09-11 09:39:13

原文:在编写wpf界面时候中出现如下错误: 类型引用不明确。至少有两个名称空间(“System.Windows”和“System.Windows”)中已出现名为“VisualStateManager”的类型。请考虑调整程序集 XmlnsDefinition 特性。

wpf中类型引用不明确。至少有两个名称空间(“System.Windows”和“System.Windows”)中已出现名为“VisualState

你是不是用了WPFToolKit?如果是的,那原因就是WPFToolKit里也有VisualState,与WPF中的VisualState引用不明确,可以添加原先VisualState的引用:xmlns:sysWin="clr-namespace:System.Windows;assembly=PresentationFramework"

然后给每个VisualState、VisualStateManager还有VisualStateGroup加上sysWin前缀就可以了

转载请保留出处:http://www.01yun.com/dotnet_question/20131017/635784.html