2013-03-18 40 views
0

默认ColumnSeries.DataPointStyle是相当不错的,但它的标签是不可见的。如何返回默认的DataPointStyle?

因此,我已经应用自定义样式来制作可见的数据点标签,但此后默认样式看起来很丑。

如何同时返回默认数据点样式并生成可见数据点标签?谢谢!

这是我的XAML:

<toolkit:ColumnSeries Title="Male" ItemsSource="{Binding MaleSerie}" IndependentValueBinding="{Binding ItemName}" 
      DependentValueBinding="{Binding Count}" ToolTipService.ToolTip="{Binding Count}" 
      AnimationSequence="Simultaneous" 
      HorizontalAlignment="Left" Height="304" VerticalAlignment="Top" Width="266"> 

      <toolkit:ColumnSeries.DataPointStyle> 
       <Style TargetType="toolkit:ColumnDataPoint"> 
        <Setter Property="Background" Value="Blue"/> 
        <Setter Property="Template"> 
         <Setter.Value> 
          <ControlTemplate TargetType="toolkit:ColumnDataPoint"> 
           <Grid> 
            <Rectangle 
          Fill="{TemplateBinding Background}" 
          Stroke="Black"/> 
            <Grid Background="#aaffffff" Margin="0" HorizontalAlignment="Center" VerticalAlignment="Center"> 
             <TextBlock FontSize="10" Text="{TemplateBinding FormattedDependentValue}" FontWeight="Bold" Width="Auto" Margin="2"/> 
            </Grid> 
           </Grid> 
          </ControlTemplate> 
         </Setter.Value> 
        </Setter> 
       </Style> 
      </toolkit:ColumnSeries.DataPointStyle> 

     </toolkit:ColumnSeries> 

enter image description here

回答