我是WPF (.NET 4.0,VS2010)的新手,并尝试包含一个属性网格。我的XAML标记如下所示:
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:WpfToolkit="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid;assembly=WPFToolkit.Extended"
Title="MainWindow" Height="350" Width="525">
<Grid>
<WpfToolkit:PropertyGrid Name="Grid" />
</Grid>
</Window>现在我得到的错误是没有找到程序集'WPFToolkit.Extended‘。我已经在我的应用程序中包含了对dll Xceed.Wpf.Toolkit.dll的引用。
为什么它不起作用?我是否必须包含更多的参考文献,或者可能是什么错误?感谢您的回复。
发布于 2013-04-14 04:26:10
我可以解决这个问题。我的错误是我没有解锁包含dll的zip文件。在此之后,我必须将标记中名称空间的源更改为uri。在最终标记下面:
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:WpfToolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
Title="MainWindow" Height="350" Width="525">
<Grid>
<WpfToolkit:PropertyGrid Name="Grid" />
</Grid>
</Window>发布于 2013-04-13 22:30:17
检查您的项目属性。在应用程序下,在目标框架下选择了什么?默认情况下,对于新项目,“.Net Framework4 Client Profile”处于选中状态。如果扩展库使用客户端配置文件之外的.net部分,则需要选择'.Net Framekwork4‘来使用扩展功能。
https://stackoverflow.com/questions/15987512
复制相似问题