Class TreeRootLine
Represents the RootLine for TreeViewAdv control
Inheritance
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Tools.Wpf.dll
Syntax
public class TreeRootLine : FrameworkElement
Constructors
TreeRootLine()
Declaration
public TreeRootLine()
Fields
LineBrushProperty
Identifies TreeViewAdv. LineBrush dependency property.
Declaration
public static readonly DependencyProperty LineBrushProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LinePenProperty
Identifies TreeViewAdv. LinePen dependency property.
Declaration
public static readonly DependencyProperty LinePenProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LineStrokeDashArrayProperty
Identifies TreeViewAdv. LinePen dependency property.
Declaration
public static readonly DependencyProperty LineStrokeDashArrayProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LineStrokeDashOffsetProperty
Identifies TreeViewAdv. LinePen dependency property.
Declaration
public static readonly DependencyProperty LineStrokeDashOffsetProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LineStrokeThicknessProperty
Identifies TreeViewAdv. LineStrokeThickness dependency property.
Declaration
public static readonly DependencyProperty LineStrokeThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
IsVerticalLine
Gets or sets a value indicating whether this instance is vertical line.
Declaration
public bool IsVerticalLine { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
LineBrush
Gets or sets a brush that describes the background of a node line.
Declaration
public Brush LineBrush { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | Type: System.Windows.Media.Brush The brush that is used to fill the line's node. |
Examples
This example shows how to set LineBrush property in C#.
using System.Windows;
using Syncfusion.Windows.Tools.Controls;
namespace Sample1
{
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
myTreeView.LineBrush = Brushes.Red;
}
}
}
This example shows how to set LineBrush property in XAML.
<Window x:Class="Sample1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Syncfusion.Windows.Tools.Controls;assembly=Syncfusion.Tools.WPF"
Title="Window1" Height="300" Width="300">
<StackPanel Name="stackPanel">
<local:TreeViewAdv Name="myTreeview" LineBrush="Red">
<local:TreeViewItemAdv Header="Employee1">
<local:TreeViewItemAdv Header="Jesper"/>
<local:TreeViewItemAdv Header="Aaberg"/>
<local:TreeViewItemAdv Header="12345"/>
</local:TreeViewItemAdv>
<local:TreeViewItemAdv Header="Employee2">
<local:TreeViewItemAdv Header="Dominik"/>
<local:TreeViewItemAdv Header="Paiha"/>
<local:TreeViewItemAdv Header="98765"/>
</local:TreeViewItemAdv>
</local:TreeViewAdv>
</StackPanel>
</Window>
See Also
LinePen
Gets or sets a brush that describes the pen of a node line.
Declaration
public Pen LinePen { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Pen | Type: System.Windows.Media.Pen The pen that is used to fill the line's node. |
Examples
This example shows how to set LinePen property in C#.
using System.Windows;
using Syncfusion.Windows.Tools.Controls;
namespace Sample1
{
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
myTreeView.LinePen = new Pen( Brushes.Red, 1 );
}
}
}
This example shows how to set LinePen property in XAML.
<Window x:Class="Sample1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Syncfusion.Windows.Tools.Controls;assembly=Syncfusion.Tools.WPF"
Title="Window1" Height="300" Width="300">
<StackPanel Name="stackPanel">
<local:TreeViewAdv Name="myTreeview">
<local:TreeViewAdv.LinePen>
<Pen Brush="Red" Thickness="2"/>
</local:TreeViewAdv.LinePen>
<local:TreeViewItemAdv Header="Employee1">
<local:TreeViewItemAdv Header="Jesper"/>
<local:TreeViewItemAdv Header="Aaberg"/>
<local:TreeViewItemAdv Header="12345"/>
</local:TreeViewItemAdv>
<local:TreeViewItemAdv Header="Employee2">
<local:TreeViewItemAdv Header="Dominik"/>
<local:TreeViewItemAdv Header="Paiha"/>
<local:TreeViewItemAdv Header="98765"/>
</local:TreeViewItemAdv>
</local:TreeViewAdv>
</StackPanel>
</Window>
See Also
LineStrokeDashArray
Gets or sets a collection of Double values that indicate the pattern of dashes and gaps that is used to outline node line.
Declaration
public DoubleCollection LineStrokeDashArray { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.DoubleCollection | Type: System.Windows.Media.DoubleCollection A collection of Double values that specify the pattern of dashes and gaps. |
Examples
This example shows how to set LineStrokeDashArray property in C#.
using System.Windows;
using Syncfusion.Windows.Tools.Controls;
namespace Sample1
{
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
DoubleCollection dcollection= new DoubleCollection();
dcollection.Add(2);
myTreeView.StrokeDashArray = dcollection;
}
}
}
This example shows how to set LineStrokeDashArray property in XAML.
<Window x:Class="Sample1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Syncfusion.Windows.Tools.Controls;assembly=Syncfusion.Tools.WPF"
Title="Window1" Height="300" Width="300">
<StackPanel Name="stackPanel">
<local:TreeViewAdv Name="myTreeview" LineStrokeDashArray="2">
<local:TreeViewItemAdv Header="Employee1">
<local:TreeViewItemAdv Header="Jesper"/>
<local:TreeViewItemAdv Header="Aaberg"/>
<local:TreeViewItemAdv Header="12345"/>
</local:TreeViewItemAdv>
<local:TreeViewItemAdv Header="Employee2">
<local:TreeViewItemAdv Header="Dominik"/>
<local:TreeViewItemAdv Header="Paiha"/>
<local:TreeViewItemAdv Header="98765"/>
</local:TreeViewItemAdv>
</local:TreeViewAdv>
</StackPanel>
</Window>
See Also
LineStrokeDashOffset
Gets or sets a Double that specifies the distance within the dash pattern where a dash begins in node line.
Declaration
public double LineStrokeDashOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Windows.Media.DoubleCollection A collection of Double values that specify the pattern of dashes and gaps. |
Examples
This example shows how to set LineStrokeDashOffset property in C#.
using System.Windows;
using Syncfusion.Windows.Tools.Controls;
namespace Sample1
{
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
myTreeView.LineStrokeDashOffset = 0.5d;
}
}
}
This example shows how to set LineStrokeDashOffset property in XAML.
<Window x:Class="Sample1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Syncfusion.Windows.Tools.Controls;assembly=Syncfusion.Tools.WPF"
Title="Window1" Height="300" Width="300">
<StackPanel Name="stackPanel">
<local:TreeViewAdv Name="myTreeview" LineStrokeDashOffset="0.5">
<local:TreeViewItemAdv Header="Employee1">
<local:TreeViewItemAdv Header="Jesper"/>
<local:TreeViewItemAdv Header="Aaberg"/>
<local:TreeViewItemAdv Header="12345"/>
</local:TreeViewItemAdv>
<local:TreeViewItemAdv Header="Employee2">
<local:TreeViewItemAdv Header="Dominik"/>
<local:TreeViewItemAdv Header="Paiha"/>
<local:TreeViewItemAdv Header="98765"/>
</local:TreeViewItemAdv>
</local:TreeViewAdv>
</StackPanel>
</Window>
See Also
LineStrokeThickness
Gets or sets a stroke thickness that describes the thickness of a node line.
Declaration
public double LineStrokeThickness { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double The double that is used to draw the node line. |
Examples
This example shows how to set StrokeThickness property in C#.
using System.Windows;
using Syncfusion.Windows.Tools.Controls;
namespace Sample1
{
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
myTreeView.LineStrokeThickness = 2;
}
}
}
This example shows how to set StrokeThickness property in XAML.
<Window x:Class="Sample1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Syncfusion.Windows.Tools.Controls;assembly=Syncfusion.Tools.WPF"
Title="Window1" Height="300" Width="300">
<StackPanel Name="stackPanel">
<local:TreeViewAdv Name="myTreeview" LineStrokeThickness="2">
<local:TreeViewItemAdv Header="Employee1">
<local:TreeViewItemAdv Header="Jesper"/>
<local:TreeViewItemAdv Header="Aaberg"/>
<local:TreeViewItemAdv Header="12345"/>
</local:TreeViewItemAdv>
<local:TreeViewItemAdv Header="Employee2">
<local:TreeViewItemAdv Header="Dominik"/>
<local:TreeViewItemAdv Header="Paiha"/>
<local:TreeViewItemAdv Header="98765"/>
</local:TreeViewItemAdv>
</local:TreeViewAdv>
</StackPanel>
</Window>
See Also
Methods
OnRender(DrawingContext)
When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.
Declaration
protected override void OnRender(DrawingContext drawingContext)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.DrawingContext | drawingContext | The drawing instructions for a specific element. This context is provided to the layout system. |