PieChart与标签

时间:2012-03-20 09:36:30

标签: wpf vb.net charts wpftoolkit pie-chart

我想在WPF中制作LabeledPieCharts(来源:Bea's Blog ) 我已经下载了DemoProject并且它运行了。如果我想创建一个LabeledPieChart,则会出现此错误:

The Tag "LabeledPieChart.Series" isn't in XML-Namespace "clr-namespace:Controls;assembly=Controls". Line 65 Position 14.

这是我的代码:

<customControls:LabeledPieChart x:Name="labeledPieChart"
                                Title="Population of Puget Sound Cities"
                                Grid.Row="3"
                                Width="700"
                                Height="500"
                                BorderBrush="Gray">
    <customControls:LabeledPieChart.Series>
        <customControls:LabeledPieSeries x:Name="labeledPieSeries"
                                         DependentValuePath="Population"
                                         IndependentValuePath="Name"
                                         IsSelectionEnabled="True"
                                         ItemsSource="{Binding}"
                                         LabelDisplayMode="Auto"
                                         PieChartLabelItemTemplate="{StaticResource pieChartLabelDataTemplate}"
                                         PieChartLabelStyle="{StaticResource pieChartLabelStyle}" />
    </customControls:LabeledPieChart.Series>
</customControls:LabeledPieChart>

1 个答案:

答案 0 :(得分:0)

我已下载了该项目,您的代码似乎运行正常。也许this question会对你有所帮助。