2011-10-17 39 views
0

是否可以更改LineSeries的厚度? 是否可以将LineSeries显示为虚线? 我对AreaSeries有个疑问,不管我的所有Area系列是从x轴绘制的。我想要的是我可以为这四个点(2,2),(2,6),(8,6),(8,2)绘制一个区域。 我该如何管理它?WPF工具包制图Lineseries造型

回答

4

用于设置厚度和LineSeries的虚线样式,使用样式像这里示出的一个:

<Window.Resources> 
    <Style x:Key="DashedPolyLine" TargetType="{x:Type Polyline}"> 
     <Setter Property="Stroke" Value="Red" /> 
     <Setter Property="Width" Value="3" /> 
     <Setter Property="StrokeDashArray" Value="4, 2" /> 
    </Style> 
</Window.Resources> 
. 
. 
. 
<charting:LineSeries 
    ItemsSource="{Binding MyItems}" 
    IndependentValuePath="myIndValue" 
    DependentValuePath="myDepValue" 
    PolylineStyle="{StaticResource DashedPolyLine}" 
</charting:LineSeries> 
+3

用于设置线的厚度,使用'StrokeThickness'代替OD'Width' – Pieniadz

+0

感谢您的提示! – PIntag