专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Silverlight

新手LineSeries折线的圆点如何去掉

发布时间:2011-06-27 20:17:32 文章来源:www.iduyao.cn 采编人员:星星草
新手求助LineSeries折线的圆点怎么去掉
由于数据比较密集,LineSeries的圆点很大程度上影响了折线图的展示,请问可不可以设置式样把圆点去除。

------解决方案--------------------
可以哈。参考以下代码
C# code

 <UserControl.Resources>
  <Style x:Key="MyLineDataPointStyle" TargetType="toolkit:LineDataPoint">
   <Setter Property="Background" Value="Orange"/>
   <Setter Property="BorderBrush" Value="Gray"/>
   <Setter Property="BorderThickness" Value="1"/>
   <Setter Property="IsTabStop" Value="False"/>
   <Setter Property="Width" Value="8"/>
   <Setter Property="Height" Value="8"/>
   <Setter Property="Template">
    <Setter.Value>
     <ControlTemplate TargetType="toolkit:LineDataPoint"/>
    </Setter.Value>
   </Setter>
  </Style>
 </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="White">
        <toolkit:Chart HorizontalAlignment="Left" Margin="30,30,0,0"
                       Name="mychart" Title="Chart Title" VerticalAlignment="Top" Height="300" Width="500">
            <toolkit:Chart.Series>
                <toolkit:LineSeries x:Name="myLineChart" Loaded="lineChart_Loaded"
                                IndependentValueBinding="{Binding Key}"
                                DependentValueBinding="{Binding Value}"
                                DataPointStyle="{StaticResource MyLineDataPointStyle}">
                </toolkit:LineSeries>
            </toolkit:Chart.Series>
        </toolkit:Chart>
    </Grid>
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: