2013-03-18 39 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

回答