我收到如下所示的错误:
Error 1 The tag 'ResourceDictionaryCollection' does not exist in XML
namespace 'clr-namespace:System.Windows.Controls.DataVisualization;
assembly=System.Windows.Controls.DataVisualization.Toolkit'.
这是代码:
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:DV="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit"
xmlns:DVC="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
mc:Ignorable="d"
MinHeight="384" MinWidth="579">
<UserControl.Resources>
<DV:ResourceDictionaryCollection x:Key="MyPalette">
<ResourceDictionary>
<Style x:Key="DataPointStyle" TargetType="Control">
<Setter Property="Background" Value="Purple" />
</Style>
</ResourceDictionary>
我应该如何纠正这个错误?我在 Visual C# 2010 上运行。我已经安装了 WPF 工具包,但我仍然收到命名空间错误。