Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a PieChart (PieSeries) that I want to customize.

Unfortunatly when I use Blend to edit the DataPointStyle, Blend does put enough XAML in the style to draw the pie slices. The pie chart becomes a blank window. Where can I get a default DataPointStyle from so that I can start tweeking from a working style?

Here is the Xaml that Blend gives me:

XML
<Style x:Key="PieDataPointStyle1" TargetType="{x:Type chartingToolkit:PieDataPoint}">
    <Setter Property="Background" Value="Orange"/>
    <Setter Property="BorderBrush" Value="White"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="RatioStringFormat" Value="{}{0:p2}"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type chartingToolkit:PieDataPoint}">
                <Grid x:Name="Root" Opacity="0">
                    <Path x:Name="Slice" Data="{TemplateBinding Geometry}" Stroke="{TemplateBinding BorderBrush}" StrokeMiterLimit="1" Fill="#FF1C3C7C">
                        <Path.ToolTip>
                            <StackPanel>
                                <ContentControl Content="{TemplateBinding FormattedDependentValue}"/>
                                <ContentControl Content="{TemplateBinding FormattedRatio}"/>
                            </StackPanel>
                        </Path.ToolTip>
                    </Path>
                    <Path x:Name="SelectionHighlight" Data="{TemplateBinding GeometrySelection}" Fill="Red" IsHitTestVisible="False" Opacity="0" StrokeMiterLimit="1"/>
                    <Path x:Name="MouseOverHighlight" Data="{TemplateBinding GeometryHighlight}" Fill="White" IsHitTestVisible="False" Opacity="0" StrokeMiterLimit="1"/>
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>


Thanks,

Terry.
Posted

1 solution

The WPF toolkit is open source, so you should find it somewhere in there.
Downloading the source might help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900