Xceed Toolkit Plus for WPF v4.6 Documentation
LinePrimitiveInfo Class
Members  Example 


Xceed.Wpf.Toolkit Assembly > Xceed.Wpf.Toolkit.Chart Namespace : LinePrimitiveInfo Class

Represents information used to perform layout of line charts and used in the databinding of their primitives for styling.

Syntax
'Declaration
 
<TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
<NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
Public Class LinePrimitiveInfo 
   Inherits PrimitiveInfoBase
'Usage
 
Dim instance As LinePrimitiveInfo
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public class LinePrimitiveInfo : PrimitiveInfoBase 
Example
The following shows how to bind PrimitiveInfoBase properties of gridlines and ticks in order to set their color, thickness, etc.
<Window x:Class="WpfApplication56.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <DataTemplate x:Key="GridTemplateX">
            <Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
                <Polyline Points="{Binding Path=Points}" StrokeThickness="1" Stroke="Red" StrokeDashArray="1 5 1 1" />
            </Canvas>
        </DataTemplate>

        <DataTemplate x:Key="GridTemplateY">
            <Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
                <Polyline  Points="{Binding Path=Points}" StrokeThickness="1" Stroke="Green" StrokeDashArray="8 3 1 3"/>
            </Canvas>
        </DataTemplate>

        <DataTemplate x:Key="TickTemplateX">
            <Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
                <Line X1="{Binding Path=XStart}" Y1="{Binding Path=YStart}" X2="{Binding Path=XEnd}" Y2="{Binding Path=YEnd}" StrokeThickness="5" Stroke="Red"/>
            </Canvas>
        </DataTemplate>

        <DataTemplate x:Key="TickTemplateY">
            <Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
                <Line  X1="{Binding Path=XStart}" Y1="{Binding Path=YStart}" X2="{Binding Path=XEnd}" Y2="{Binding Path=YEnd}" StrokeThickness="5" Stroke="Green"/>
            </Canvas>
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <xctk:Chart>
            <xctk:Chart.Areas>
                <xctk:Area x:Name="_area1" Title="Area #1" >
                    <xctk:Area.XAxis>
                        <xctk:Axis ShowTickLabels="True" GridTemplate="{StaticResource GridTemplateX}" TickTemplate="{StaticResource TickTemplateX}" />
                    </xctk:Area.XAxis>
                    <xctk:Area.YAxis>
                        <xctk:Axis ShowTickLabels="True" GridTemplate="{StaticResource GridTemplateY}" TickTemplate="{StaticResource TickTemplateY}"/>
                    </xctk:Area.YAxis>
                    <xctk:Area.Series>
                        <xctk:Series x:Name="_series1"
                                          DefaultInterior="BlueViolet"
                                          Spacing="20"
                                          ShowPointsInLegend="false"
                                          ShowHintLabels="false"
                                          HintLineLength="20">
                            <xctk:Series.Layout>
                                <xctk:LineLayout />
                            </xctk:Series.Layout>
                            <xctk:Series.DataPoints>
                                <xctk:DataPoint X="1" Y="1" Label="Oct" />
                                <xctk:DataPoint X="2" Y="2" Label="Jan"/>
                                <xctk:DataPoint X="2.5" Y="1.5" Label="Feb" />
                                <xctk:DataPoint X="4" Y="1" Label="Jun"/>
                                <xctk:DataPoint X="1.5" Y="3" Label="Dec"/>
                                <xctk:DataPoint X="5" Y="5" Label="Apr"/>
                                <xctk:DataPoint X="3" Y="1" Label="Nov"/>
                                <xctk:DataPoint X="4.5" Y="7" Label="Jul"/>
                                <xctk:DataPoint X="3.5" Y="4.5" Label="Aug"/>
                            </xctk:Series.DataPoints>
                        </xctk:Series>
                    </xctk:Area.Series>
                </xctk:Area>
            </xctk:Chart.Areas>
        </xctk:Chart>
    </Grid>
</Window>
Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase
            Xceed.Wpf.Toolkit.Chart.LinePrimitiveInfo
               Xceed.Wpf.Toolkit.Chart.AreaPrimitiveInfo

Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

LinePrimitiveInfo Members
Xceed.Wpf.Toolkit.Chart Namespace