WPF

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class VirtualTreeView

    Show / Hide Table of Contents

    Class VirtualTreeView

    The VirtualTreeView displays a hierarchical collection of expandable TreeNode items maintained by a TreeModel. A flattened representations of the hierarchy of nodes can be accessed through the VisibleNodes property of the Model where each visible node is mapped to a row index and vice versa. TreeNodesFlattenedList also implements ILineSizeHost and the VirtualTreeView assigns it to RowHeightsProvider in order to be able to pixel scroll through visible and expanded nodes.

    VirtualTreeView returns cell contents with the GetRenderStyleInfo(RowColumnIndex) method which returns a TreeRenderStyleInfo object. Each cell is associated with a Syncfusion.Windows.Controls.VirtualTreeView.TreeCellRenderer object which provides methods for measuring, arranging and drawing contents of a cell. The VirtualTreeView implements the OnArrangeContent(Size) and System.Windows.UIElement.OnRender(System.Windows.Media.DrawingContext) methods. Within implementation of the OnArrangeContent method each cells UIElement children are placed on the controls area. A cell renderer can also be without any UIElement children and instead draw all its contents directly to the DrawingContext of the VirtualizingCellsControl when the System.Windows.UIElement.OnRender(System.Windows.Media.DrawingContext) method is executed. For a cell renderer it is also possible to do both: Arrange UIElements on the controls area and draw additional contents in its render area. There are also various optimization techniques that can be implemented with the renderer and are discussed in the ICellRenderer overview.

    The virtualization of UIElement children of cell renderers is implemented in the arrange cells code. At the time a cell is placed the cell renderer is called to create and intialize the UIElement children. When a cell is scrolled out of view the cell renderer is called to unload the UIElement children. A cell renderer can decide whether to unload a UIElement, keep it alive or move it to a recycle bin and reuse it later. The main logic of this code is implemented by the TreeVirtualizingCellRendererBase<T> class which contains more detailed discussion about this feature.

    Inheritance
    System.Object
    VisualContainer
    ScrollControl
    ScrollAxisControl
    VirtualizingCellsControl
    VirtualTreeView
    Implements
    IScrollBarProvider
    System.Windows.Controls.Primitives.IScrollInfo
    System.IDisposable
    Inherited Members
    VirtualizingCellsControl.floatcellran
    VirtualizingCellsControl.CellsControlProperty
    VirtualizingCellsControl.CellUIElementProperty
    VirtualizingCellsControl.ArrangeCellArgsProperty
    VirtualizingCellsControl.CellRowColumnIndexProperty
    VirtualizingCellsControl.RenderCellInfoProperty
    VirtualizingCellsControl.CellRendererProperty
    VirtualizingCellsControl.ShowGridLinesProperty
    VirtualizingCellsControl.OnUnloaded(RoutedEventArgs)
    VirtualizingCellsControl.GetCellsControl(DependencyObject)
    VirtualizingCellsControl.GetCellRendererParentControl(DependencyObject)
    VirtualizingCellsControl.SetCellsControl(DependencyObject, VirtualizingCellsControl)
    VirtualizingCellsControl.GetCellUIElement(DependencyObject)
    VirtualizingCellsControl.SetCellUIElement(DependencyObject, UIElement)
    VirtualizingCellsControl.GetArrangeCellArgs(DependencyObject)
    VirtualizingCellsControl.SetArrangeCellArgs(DependencyObject, ArrangeCellArgs)
    VirtualizingCellsControl.GetCellRowColumnIndex(DependencyObject)
    VirtualizingCellsControl.SetCellRowColumnIndex(DependencyObject, RowColumnIndex)
    VirtualizingCellsControl.GetRenderCellInfo(DependencyObject)
    VirtualizingCellsControl.SetRenderCellInfo(DependencyObject, IRenderCellInfo)
    VirtualizingCellsControl.SetCellRenderer(DependencyObject, ICellRenderer)
    VirtualizingCellsControl.GetHasFocusWithin(UIElement)
    VirtualizingCellsControl.OnShowGridLinesChanged(DependencyPropertyChangedEventArgs)
    VirtualizingCellsControl.CreateScrollControlChildFrame()
    VirtualizingCellsControl.SetFrameProperties(VisualContainer, ScrollControlChildFrame)
    VirtualizingCellsControl.OnPreviewKeyDown(KeyEventArgs)
    VirtualizingCellsControl.ShouldCellsControlHandleKeyDownScrolling(KeyEventArgs)
    VirtualizingCellsControl.OnKeyDown(KeyEventArgs)
    VirtualizingCellsControl.ScrollInDirection(KeyEventArgs)
    VirtualizingCellsControl.OnRender(DrawingContext)
    VirtualizingCellsControl.ShouldRenderStyleBackgrounds()
    VirtualizingCellsControl.RenderBackgrounds(DrawingContext)
    VirtualizingCellsControl.RenderCells(DrawingContext)
    VirtualizingCellsControl.RenderRow(DrawingContext, VisibleLineInfo, Point)
    VirtualizingCellsControl.RenderCell(DrawingContext, RenderCellArgs)
    VirtualizingCellsControl.OnRenderCell(DrawingContext, RenderCellArgs)
    VirtualizingCellsControl.OnRenderCellBackground(DrawingContext, VisibleCoveredCellInfo, RenderCellArgs)
    VirtualizingCellsControl.OnRenderCellBackground(DrawingContext, VisibleOverlappingCellInfo, RenderCellArgs)
    VirtualizingCellsControl.OnRenderCellBackground(DrawingContext, RenderCellArgs)
    VirtualizingCellsControl.InvalidateCellBackground(Int32, Int32)
    VirtualizingCellsControl.InvalidateCellBackground(Int32, Int32, Boolean)
    VirtualizingCellsControl.InvalidateCellBorder(RowColumnIndex)
    VirtualizingCellsControl.InvalidateCellBorder(Int32, Int32)
    VirtualizingCellsControl.InvalidateCellBackground(RowColumnIndex)
    VirtualizingCellsControl.InvalidateCellRenderStyleBackground(RowColumnIndex)
    VirtualizingCellsControl.RenderCoveredCells(DrawingContext)
    VirtualizingCellsControl.RenderOverlappingCells(DrawingContext)
    VirtualizingCellsControl.RenderCellBorders(DrawingContext)
    VirtualizingCellsControl.CanDrawHorizontalLineFirst()
    VirtualizingCellsControl.PushClip(DrawingContext, Rect)
    VirtualizingCellsControl.PushClip(DrawingContext, Rect, Rect)
    VirtualizingCellsControl.OnRenderBorder(DrawingContext, Rect, Rect, CellBorderSide, Pen)
    VirtualizingCellsControl.MeasureOverride(Size)
    VirtualizingCellsControl.OnScrollLayoutChanged()
    VirtualizingCellsControl.OnInvalidated(Boolean)
    VirtualizingCellsControl.SetCellLayoutDirty()
    VirtualizingCellsControl.OnArrangeOverride(Size, Boolean)
    VirtualizingCellsControl.OnArrangeContent(Size)
    VirtualizingCellsControl.ArrangeCombinedCellBackgrounds(Size)
    VirtualizingCellsControl.GetCellBackground(IRenderCellInfo, Boolean)
    VirtualizingCellsControl.GetCoveredCell(Int32, Int32)
    VirtualizingCellsControl.GetCoveredCell(RowColumnIndex)
    VirtualizingCellsControl.ArrangeCoveredCells(Size)
    VirtualizingCellsControl.ReArrangeCoveredCells(VirtualizingCellsControl)
    VirtualizingCellsControl.GetVisibleCoveredCell(VisibleLineInfo, VisibleLineInfo)
    VirtualizingCellsControl.GetOverlappingCell(Int32, Int32)
    VirtualizingCellsControl.GetOverlappingCell(RowColumnIndex)
    VirtualizingCellsControl.ArrangeOverlappingCells(Size)
    VirtualizingCellsControl.GetVisibleOverlappingCell(VisibleLineInfo, VisibleLineInfo)
    VirtualizingCellsControl.GetCellSpanBackgrounds(Int32, Int32)
    VirtualizingCellsControl.GetCellSpanBackgrounds(RowColumnIndex)
    VirtualizingCellsControl.ArrangeCellSpanBackgrounds(Size)
    VirtualizingCellsControl.CellSpanToRect(ScrollAxisRegion, ScrollAxisRegion, CellSpanInfo)
    VirtualizingCellsControl.CellSpanToClippedVisibleRect(CellSpanInfo)
    VirtualizingCellsControl.UnloadArrangedCells()
    VirtualizingCellsControl.InvalidateCells()
    VirtualizingCellsControl.InvalidateCell(RowColumnIndex)
    VirtualizingCellsControl.InvalidateCell(CellSpanInfoBase)
    VirtualizingCellsControl.InvalidateCell(CellSpanInfoBase, Boolean)
    VirtualizingCellsControl.GetCellUIElements(RowColumnIndex)
    VirtualizingCellsControl.GetCellUIElements(Int32, Int32)
    VirtualizingCellsControl.OnArrangeCell(ArrangeCellArgs)
    VirtualizingCellsControl.PrepareCellUIElements(ArrangeCellArgs, List<UIElement>, ScrollControlChildFrame)
    VirtualizingCellsControl.ArrangeCellBorders(Size)
    VirtualizingCellsControl.CanCombineCellBorder(IRenderCellInfo, IRenderCellInfo, Pen, Pen, CellBorderSide)
    VirtualizingCellsControl.GetCellBorder(IRenderCellInfo, CellBorderSide)
    VirtualizingCellsControl.GetVisibleRowAndColumn(RowColumnIndex, VisibleLineInfo, VisibleLineInfo)
    VirtualizingCellsControl.DelayedCreateCellUIElements(RowColumnIndex)
    VirtualizingCellsControl.RefreshCellUIElementsContent(RowColumnIndex)
    VirtualizingCellsControl.EraseRenderedCell(RowColumnIndex, Rect)
    VirtualizingCellsControl.PointToCellRowColumnIndex(MouseEventArgs, Boolean)
    VirtualizingCellsControl.PointToCellRowColumnIndex(Point, Boolean)
    VirtualizingCellsControl.AdjustCoveredCellRowColumnIndex(RowColumnIndex)
    VirtualizingCellsControl.Dispose(Boolean)
    VirtualizingCellsControl.ClearVisualsCacheWhenUnloaded
    VirtualizingCellsControl.AllowBorderRounding
    VirtualizingCellsControl.EnableFrameArrangement
    VirtualizingCellsControl.ShowGridLines
    VirtualizingCellsControl.CoveredCellsProvider
    VirtualizingCellsControl.OverlappingCellsProvider
    VirtualizingCellsControl.CellSpanBackgroundsProvider
    VirtualizingCellsControl.MouseControllerDispatcher
    VirtualizingCellsControl.EnableRenderCellDrawingVisuals
    VirtualizingCellsControl.RenderedCellVisuals
    VirtualizingCellsControl.IsInOnRender
    VirtualizingCellsControl.IndividualCellBackgroundsToDraw
    VirtualizingCellsControl.UseGuidelineSetToRenderBorder
    VirtualizingCellsControl.UseGuidelineSetToRenderBackground
    VirtualizingCellsControl.ArrangedCellUIElements
    VirtualizingCellsControl.IsInArrageCell
    ScrollAxisControl.CanAutoCalculateWidth()
    ScrollAxisControl.LineDown()
    ScrollAxisControl.LineUp()
    ScrollAxisControl.PageDown()
    ScrollAxisControl.PageUp()
    ScrollAxisControl.LineRight()
    ScrollAxisControl.LineLeft()
    ScrollAxisControl.PageLeft()
    ScrollAxisControl.PageRight()
    ScrollAxisControl.ScrollToTop()
    ScrollAxisControl.ScrollToLeftEnd()
    ScrollAxisControl.ScrollToBottom()
    ScrollAxisControl.ScrollToRightEnd()
    ScrollAxisControl.OnMouseWheel(MouseWheelEventArgs)
    ScrollAxisControl.OnRenderSizeChanged(SizeChangedInfo)
    ScrollAxisControl.UpdateAxis(Size)
    ScrollAxisControl.PointToCellRowColumnIndex(MouseEventArgs)
    ScrollAxisControl.PointToCellRowColumnIndexOutsideCells(Point, Boolean)
    ScrollAxisControl.PointToCellRowColumnIndex(Point)
    ScrollAxisControl.GetClipRect(ScrollAxisRegion, ScrollAxisRegion)
    ScrollAxisControl.IsRowVisible(Int32)
    ScrollAxisControl.IsColumnVisible(Int32)
    ScrollAxisControl.IsCellVisible(RowColumnIndex)
    ScrollAxisControl.ScrollRows
    ScrollAxisControl.ScrollColumns
    ScrollAxisControl.HorizontalPixelScroll
    ScrollAxisControl.VerticalPixelScroll
    ScrollAxisControl.AllowPixelScrollPadding
    ScrollAxisControl.TopRowIndex
    ScrollAxisControl.LeftColumnIndex
    ScrollAxisControl.RowHeightsProvider
    ScrollAxisControl.ColumnWidthsProvider
    ScrollControl.ZoomScaleProperty
    ScrollControl.ScrollControlMouseMoveEvent
    ScrollControl.ScrollControlMouseUpEvent
    ScrollControl.ScrollControlMouseDownEvent
    ScrollControl.ScrollControlPreviewMouseMoveEvent
    ScrollControl.ScrollControlPreviewMouseUpEvent
    ScrollControl.ScrollControlPreviewMouseDownEvent
    ScrollControl.OnLoaded(RoutedEventArgs)
    ScrollControl.HitTestCore(PointHitTestParameters)
    ScrollControl.ArrangeOverride(Size)
    ScrollControl.InvalidateVisual()
    ScrollControl.InvalidateVisual(Boolean)
    ScrollControl.OnTopLeftFrameExtentChanged()
    ScrollControl.OnBottomRightFrameExtentChanged()
    ScrollControl.GetChildFrame(Boolean, Boolean, Boolean, Boolean, VisualContainer)
    ScrollControl.GetVisualChild(Int32)
    ScrollControl.OnVScrollBarValueChanging(Object, ValueChangingEventArgs)
    ScrollControl.OnVScrollBarValueChanged(Object, EventArgs)
    ScrollControl.OnHScrollBarValueChanging(Object, ValueChangingEventArgs)
    ScrollControl.OnHScrollBarValueChanged(Object, EventArgs)
    ScrollControl.MouseWheelUp()
    ScrollControl.MouseWheelDown()
    ScrollControl.MouseWheelLeft()
    ScrollControl.MouseWheelRight()
    ScrollControl.SetVerticalOffset(Double)
    ScrollControl.SetHorizontalOffset(Double)
    ScrollControl.MakeVisible(Visual, Rect)
    ScrollControl.OnMouseEnter(MouseEventArgs)
    ScrollControl.OnMouseLeave(MouseEventArgs)
    ScrollControl.OnMouseDown(MouseButtonEventArgs)
    ScrollControl.OnMouseMove(MouseEventArgs)
    ScrollControl.OnMouseUp(MouseButtonEventArgs)
    ScrollControl.OnPreviewMouseWheel(MouseWheelEventArgs)
    ScrollControl.OnPreviewMouseDown(MouseButtonEventArgs)
    ScrollControl.OnDrop(DragEventArgs)
    ScrollControl.OnPreviewMouseUp(MouseButtonEventArgs)
    ScrollControl.OnScrollControlMouseMove(ScrollControlMouseEventArgs)
    ScrollControl.OnScrollControlMouseUp(ScrollControlMouseButtonEventArgs)
    ScrollControl.OnScrollControlMouseDown(ScrollControlMouseButtonEventArgs)
    ScrollControl.OnScrollControlPreviewMouseMove(ScrollControlMouseEventArgs)
    ScrollControl.OnScrollControlPreviewMouseUp(ScrollControlMouseButtonEventArgs)
    ScrollControl.OnScrollControlPreviewMouseDown(ScrollControlMouseButtonEventArgs)
    ScrollControl.ZoomScale
    ScrollControl.IsArrangeDirty
    ScrollControl.IsInArrangeOverride
    ScrollControl.IsInArrangeContent
    ScrollControl.TopLeftFrameExtent
    ScrollControl.BottomRightFrameExtent
    ScrollControl.BackgroundFrame
    ScrollControl.ForegroundFrame
    ScrollControl.ElementsFrame
    ScrollControl.InnerFrame
    ScrollControl.GraphicFrame
    ScrollControl.VisualChildren
    ScrollControl.VisualChildrenCount
    ScrollControl.VScroll
    ScrollControl.HScroll
    ScrollControl.IScrollBarProvider.Element
    ScrollControl.HScrollBar
    ScrollControl.VScrollBar
    ScrollControl.ScrollOwner
    ScrollControl.CanHorizontallyScroll
    ScrollControl.CanVerticallyScroll
    ScrollControl.HorizontalOffset
    ScrollControl.VerticalOffset
    ScrollControl.ExtentWidth
    ScrollControl.ExtentHeight
    ScrollControl.ViewportWidth
    ScrollControl.ViewportHeight
    ScrollControl.HScrollBarShadow
    ScrollControl.VScrollBarShadow
    ScrollControl.AutoScroller
    ScrollControl.MouseEventListeners
    ScrollControl.ScrollControlMouseMove
    ScrollControl.ScrollControlMouseUp
    ScrollControl.ScrollControlMouseDown
    ScrollControl.ScrollControlPreviewMouseMove
    ScrollControl.ScrollControlPreviewMouseUp
    ScrollControl.ScrollControlPreviewMouseDown
    VisualContainer.WantsMouseInputProperty
    VisualContainer.WantsKeyInputProperty
    VisualContainer.CellRenderBoundsProperty
    VisualContainer.GetWantsMouseInput(DependencyObject, UIElement)
    VisualContainer.SetWantsMouseInput(DependencyObject, Nullable<Boolean>)
    VisualContainer.SetWantsKeyInput(DependencyObject, Boolean)
    VisualContainer.GetWantsKeyInput(DependencyObject)
    VisualContainer.GetRenderBoundsInherited(DependencyObject)
    VisualContainer.GetRenderBounds(DependencyObject)
    VisualContainer.SetRenderBounds(DependencyObject, Rect)
    VisualContainer.GetParent(DependencyObject)
    VisualContainer.HitTestCore(GeometryHitTestParameters)
    VisualContainer.Dispose()
    VisualContainer.Children
    Namespace: Syncfusion.Windows.Controls.VirtualTreeView
    Assembly: Syncfusion.GridCommon.Wpf.dll
    Syntax
    public class VirtualTreeView : VirtualizingCellsControl, IScrollBarProvider, IScrollInfo, IDisposable

    Constructors

    VirtualTreeView()

    Initializes a new instance of the VirtualTreeView class.

    Declaration
    public VirtualTreeView()

    Fields

    NodeTemplateProperty

    Defines the DataTemplate to use with the expandable node renderer.

    Declaration
    public static readonly DependencyProperty NodeTemplateProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    Properties

    Model

    Gets or sets the model.

    Declaration
    public TreeModel Model { get; set; }
    Property Value
    Type Description
    TreeModel

    The model.

    NodeTemplate

    Gets or sets the DataTemplate to use with the expandable node renderer.

    Declaration
    public DataTemplate NodeTemplate { get; set; }
    Property Value
    Type Description
    System.Windows.DataTemplate

    The node template.

    RenderStyles

    Returns a container object which manages cell styles (TreeRenderStyleInfo) of rendered cells that have been scrolled into view.

    Declaration
    public TreeControlRenderStyles RenderStyles { get; }
    Property Value
    Type Description
    TreeControlRenderStyles

    Methods

    ArrangeCellUIElements(Size)

    Arranges the cells row by row. For each cell the virtual OnArrangeCell(ArrangeCellArgs) method is called. OnArrangeCell gets the ICellRenderer for a cell and calls its Arrange(ArrangeCellArgs) method.

    The method also implements the virtualization of UIElement children of cell renderers. It create new UIElement objects for cells scrolled into view or unload UIElements for cells scrolled out of view. If a UIElement has focus whenscrolled out of view it will be kept alive and not unloaded.

    Declaration
    protected override void ArrangeCellUIElements(Size arrangeSize)
    Parameters
    Type Name Description
    System.Windows.Size arrangeSize
    Overrides
    VirtualizingCellsControl.ArrangeCellUIElements(Size)

    CreateScrollAxis(Orientation, Boolean, IScrollBar, ILineSizeHost)

    Creates the row or column scroll axis. The default implementation of this method creates either a PixelScrollAxis or LineScrollAxis object. You can override this method if you want to add support for another custom tailored scroll axis object.

    Declaration
    protected override ScrollAxisBase CreateScrollAxis(Orientation orientation, bool pixelScroll, IScrollBar scrollBar, ILineSizeHost lineSizes)
    Parameters
    Type Name Description
    System.Windows.Controls.Orientation orientation

    The orientation (Vertical for row scrolling, Horizontal for column scrolling)

    System.Boolean pixelScroll

    if set to true pixel scroll; otherwise line scrolling.

    IScrollBar scrollBar

    The state of the scroll bar.

    ILineSizeHost lineSizes

    An object that provides row or column sizes.

    Returns
    Type Description
    ScrollAxisBase

    The scroll axis object.

    Overrides
    ScrollAxisControl.CreateScrollAxis(Orientation, Boolean, IScrollBar, ILineSizeHost)

    GetCellRenderer(IRenderCellInfo)

    Gets the cell renderer from a render cell style.

    Declaration
    protected override ICellRenderer GetCellRenderer(IRenderCellInfo cellInfo)
    Parameters
    Type Name Description
    IRenderCellInfo cellInfo

    The render cell style.

    Returns
    Type Description
    ICellRenderer
    Overrides
    VirtualizingCellsControl.GetCellRenderer(IRenderCellInfo)

    GetCellRenderer(DependencyObject)

    Gets the CellRendererProperty attached dependency property value.

    Declaration
    public static TreeCellRenderer GetCellRenderer(DependencyObject dpo)
    Parameters
    Type Name Description
    System.Windows.DependencyObject dpo

    The instance to be queried for the effective value of the dependency property.

    Returns
    Type Description
    Syncfusion.Windows.Controls.VirtualTreeView.TreeCellRenderer

    Returns the effective value for the given instance.

    GetRenderCellInfo(Int32, Int32)

    Gets the render cell style for a cell. VirtualizingCellsControl solely relies on the IRenderCellInfo for drawing and renderer information of a cell. Concrete implementations of this interface such as GridRenderStyleInfo or TreeRenderStyleInfo can add support for additional domain specific properties.

    Declaration
    protected override IRenderCellInfo GetRenderCellInfo(int rowIndex, int columnIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Index of the row.

    System.Int32 columnIndex

    Index of the column.

    Returns
    Type Description
    IRenderCellInfo
    Overrides
    VirtualizingCellsControl.GetRenderCellInfo(Int32, Int32)

    GetRenderStyleInfo(RowColumnIndex)

    Gets the render cell style for a cell. VirtualizingCellsControl solely relies on the IRenderCellInfo for drawing and renderer information of a cell. Concrete implementations of this interface such as GridRenderStyleInfo or TreeRenderStyleInfo can add support for additional domain specific properties.

    Declaration
    public TreeRenderStyleInfo GetRenderStyleInfo(RowColumnIndex cellRowColumnIndex)
    Parameters
    Type Name Description
    RowColumnIndex cellRowColumnIndex

    Index of the cell row column.

    Returns
    Type Description
    TreeRenderStyleInfo

    GetRenderStyleInfo(RowColumnIndex, Boolean)

    Gets the render cell style for a cell. VirtualizingCellsControl solely relies on the IRenderCellInfo for drawing and renderer information of a cell. Concrete implementations of this interface such as GridRenderStyleInfo or TreeRenderStyleInfo can add support for additional domain specific properties.

    Declaration
    public TreeRenderStyleInfo GetRenderStyleInfo(RowColumnIndex cellRowColumnIndex, bool createDisposableObject)
    Parameters
    Type Name Description
    RowColumnIndex cellRowColumnIndex

    Index of the cell row column.

    System.Boolean createDisposableObject

    if set to true create disposable object that is not cached.

    Returns
    Type Description
    TreeRenderStyleInfo

    GetRenderStyleInfo(Int32, Int32)

    Gets the render cell style for a cell. VirtualizingCellsControl solely relies on the IRenderCellInfo for drawing and renderer information of a cell. Concrete implementations of this interface such as GridRenderStyleInfo or TreeRenderStyleInfo can add support for additional domain specific properties.

    Declaration
    public TreeRenderStyleInfo GetRenderStyleInfo(int rowIndex, int columnIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Index of the row.

    System.Int32 columnIndex

    Index of the column.

    Returns
    Type Description
    TreeRenderStyleInfo

    GetRenderStyleInfo(Int32, Int32, Boolean)

    Gets the render cell style for a cell. VirtualizingCellsControl solely relies on the IRenderCellInfo for drawing and renderer information of a cell. Concrete implementations of this interface such as GridRenderStyleInfo or TreeRenderStyleInfo can add support for additional domain specific properties.

    Declaration
    public TreeRenderStyleInfo GetRenderStyleInfo(int rowIndex, int columnIndex, bool createDisposableObject)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Index of the row.

    System.Int32 columnIndex

    Index of the column.

    System.Boolean createDisposableObject

    if set to true create disposable object that is not cached.

    Returns
    Type Description
    TreeRenderStyleInfo

    GetRenderStyleInfo(DependencyObject)

    Gets the RenderCellInfoProperty attached dependency property value.

    Declaration
    public static TreeRenderStyleInfo GetRenderStyleInfo(DependencyObject dpo)
    Parameters
    Type Name Description
    System.Windows.DependencyObject dpo

    The instance to be queried for the effective value of the dependency property.

    Returns
    Type Description
    TreeRenderStyleInfo

    Returns the effective value for the given instance.

    OnPrepareRenderCell(TreePrepareRenderCellEventArgs)

    Raises the PrepareRenderCell event and optionally initializes the cells CellValue and CellRenderer.

    Declaration
    protected virtual void OnPrepareRenderCell(TreePrepareRenderCellEventArgs e)
    Parameters
    Type Name Description
    TreePrepareRenderCellEventArgs e

    The TreePrepareRenderCellEventArgs instance containing the event data.

    OnPreviewMouseMove(MouseEventArgs)

    Implements handling for the PreviewMouseMove�event. When no mouse button is pressed and the mouse is over a cell it calls .

    Declaration
    protected override void OnPreviewMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    The System.Windows.Input.MouseEventArgs that contains the event data.

    Overrides
    ScrollControl.OnPreviewMouseMove(MouseEventArgs)

    RaiseNodeCollapsed(TreeNodeEventArgs)

    Raises the NodeCollapsed event.

    Declaration
    public void RaiseNodeCollapsed(TreeNodeEventArgs e)
    Parameters
    Type Name Description
    TreeNodeEventArgs e

    The TreeNodeEventArgs instance containing the event data.

    RaiseNodeExpanded(TreeNodeEventArgs)

    Raises the NodeExpanded event.

    Declaration
    public void RaiseNodeExpanded(TreeNodeEventArgs e)
    Parameters
    Type Name Description
    TreeNodeEventArgs e

    The TreeNodeEventArgs instance containing the event data.

    RefreshDisplay()

    Refreshes the display for the tree clearing Cached Cell Styles, Recalculating Scrollbars and Repainting the whole control.

    Declaration
    public void RefreshDisplay()

    SetCellRenderer(DependencyObject, TreeCellRenderer)

    Sets the CellRendererProperty attached dependency property value.

    Declaration
    public static void SetCellRenderer(DependencyObject dpo, TreeCellRenderer value)
    Parameters
    Type Name Description
    System.Windows.DependencyObject dpo

    The instance to be assigned the value of the dependency property.

    Syncfusion.Windows.Controls.VirtualTreeView.TreeCellRenderer value

    The value.

    SetRenderStyleInfo(DependencyObject, TreeRenderStyleInfo)

    Sets the RenderCellInfoProperty attached dependency property value.

    Declaration
    public static void SetRenderStyleInfo(DependencyObject dpo, TreeRenderStyleInfo value)
    Parameters
    Type Name Description
    System.Windows.DependencyObject dpo

    The instance to be assigned the value of the dependency property.

    TreeRenderStyleInfo value

    The value.

    Events

    NodeCollapsed

    Occurs when a node was collapsed.

    Declaration
    public event TreeNodeEventHandler NodeCollapsed
    Event Type
    Type Description
    TreeNodeEventHandler

    NodeExpanded

    Occurs when node was expanded.

    Declaration
    public event TreeNodeEventHandler NodeExpanded
    Event Type
    Type Description
    TreeNodeEventHandler

    PrepareRenderCell

    Occurs just before a cell is arranged on the display in the tree control and allows you to change the settings of the TreeRenderStyleInfo. Changes made to the style's properties will only be made for rendering the style and will not be commited back to the tree node.

    Declaration
    public event TreePrepareRenderCellEventHandler PrepareRenderCell
    Event Type
    Type Description
    TreePrepareRenderCellEventHandler

    Implements

    IScrollBarProvider
    System.Windows.Controls.Primitives.IScrollInfo
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved