WPF运行错误:Ambiguous type reference. A type named 'VisualState' occurs in at least two namespaces

摘要: This error(most of the time warning) will occur when using two or more references which contains same namespace and classes. in your case you are using VisualState which is part of PresentationFramework assembly and you might have added another assembly which contains same "VisualState" ob 阅读全文
posted @ 2011-10-13 14:02 乐乐妈 阅读(508) 评论(0) 推荐(0) 编辑

命名空间

摘要: 在WPF程序中,有以下几种命名空间:WPF的命名空间、xaml的命名空间、使用系统类的命名空间和使用自定义类的命名空间首先介绍一下WPF的命名空间。WPF的命名空间是一个URL,即:xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation一个URL表示就可以全部涵盖所有用到控件的命名空间,如果在C#代码中用到这些控件,则必须连续使用using语句,直到包括所有用到的命名空间。另一种常用的命名空间是XAML的命名空间。如果需要使用XAML专用的元素和属性,那么必须声明该命名空间。习惯上XAML的声明空间被声明成x前缀xmlns 阅读全文
posted @ 2011-10-12 16:54 乐乐妈 阅读(524) 评论(0) 推荐(0) 编辑