.net 如何返回默认的DataPointStyle?
默认情况下,.net 如何返回默认的DataPointStyle?,.net,silverlight,xaml,styles,.net,Silverlight,Xaml,Styles,默认情况下,ColumnSeries.DataPointStyle非常好,但其标签不可见 因此,我应用了自定义样式来创建可见的数据点标签,但在此之后,默认样式现在看起来很难看 如何返回默认数据点样式,同时使数据点标签可见?谢谢大家! 这是我的XAML: <toolkit:ColumnSeries Title="Male" ItemsSource="{Binding MaleSerie}" IndependentValueBinding="{Binding ItemName}"
ColumnSeries.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>
对于标准Silverlight控件,您通常可以从MSDN中找到默认样式 示例:组合框默认模板: 对于工具包,您可能需要下载源代码,复制然后修改所需的内容