2011-10-17 38 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