请原谅noob问题,但我转圈圈和需要答案...Noobie WPF命名空间和转换问题
不管怎样,我一直在看这篇文章WPF: How to bind RadioButtons to an enum?但我不能让转换器将在XAML文件中被识别。
<Window x:Class="Widget.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dg="http://schemas.microsoft.com/wpf/2008/toolkit"
Title="Widget" Height="366" Width="588" WindowStyle="SingleBorderWindow">
<Window.Resources>
<EnumBooleanConverter x:Key="enumBooleanConverter" />
</Window.Resources>
...
我有一个单独的文件保持EnumBooleanConverter类,但上述参考给了我以下错误:
Error 1 The tag 'EnumBooleanConverter' does not exist in XML namespace ' http://schemas.microsoft.com/winfx/2006/xaml/presentation '.
我尝试添加到组件的引用,然后附加标签到XAML但无济于事。
<Window x:Class="Widget.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dg="http://schemas.microsoft.com/wpf/2008/toolkit"
xmlns:local="clr-namespace:Widget;assembly=Widget"
Title="Widget" Height="366" Width="588" WindowStyle="SingleBorderWindow">
<Window.Resources>
<local:EnumBooleanConverter x:Key="enumBooleanConverter" />
</Window.Resources>
...
任何帮助将不胜感激。
我想这可能已经解决了这一问题,但是当我做了rebuildI仍然得到错误。 – TeamWild 2010-01-27 13:48:20