menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TreeViewItem - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TreeViewItem

    Represents a item of data in a SfTreeView control.

    Inheritance
    System.Object
    SfView
    SfContentView
    TreeViewItem
    Implements
    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<Microsoft.Maui.IView>
    System.Collections.Generic.ICollection<Microsoft.Maui.IView>
    System.Collections.Generic.IEnumerable<Microsoft.Maui.IView>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Inherited Members
    SfContentView.Content
    SfContentView.ContentProperty
    SfContentView.OnContentChanged(Object, Object)
    SfView.ArrangeOverride(Rect)
    SfView.Children
    SfView.ClipToBounds
    SfView.GetSemanticsNodesCore(Double, Double)
    SfView.IDrawableLayout.DrawingOrder
    SfView.IDrawableLayout.InvalidateDrawable()
    SfView.MeasureOverride(Double, Double)
    SfView.OnBindingContextChanged()
    SfView.OnHandlerChanged()
    SfView.Padding
    Namespace: Syncfusion.Maui.TreeView
    Assembly: Syncfusion.Maui.TreeView.dll
    Syntax
    public class TreeViewItem : SfContentView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, ITouchListener, ITapGestureListener, IRightTapGestureListener, IDoubleTapGestureListener, ILongPressGestureListener, IGestureListener, INotifyMeasureInvalidated

    Constructors

    TreeViewItem()

    Initializes a new instance of the TreeViewItem class.

    Declaration
    public TreeViewItem()

    Properties

    TreeViewItemInfo

    Gets the TreeViewItemInfoBase of the TreeViewItem.

    Declaration
    public TreeViewItemInfoBase TreeViewItemInfo { get; }
    Property Value
    Type
    TreeViewItemInfoBase

    Methods

    ArrangeContent(Rect)

    This method is called during the measure pass of a layout cycle to arrange the elements.

    Declaration
    protected override Size ArrangeContent(Rect bounds)
    Parameters
    Type Name Description
    Microsoft.Maui.Graphics.Rect bounds

    Indicates the bounds value of the element.

    Returns
    Type Description
    Microsoft.Maui.Graphics.Size

    A Microsoft.Maui.Graphics.Size which contains the desired size of the element.

    Overrides
    SfView.ArrangeContent(Rect)

    MeasureContent(Double, Double)

    This method is called during the measure pass of a layout cycle to get the desired size of an element.

    Declaration
    protected override Size MeasureContent(double widthConstraint, double heightConstraint)
    Parameters
    Type Name Description
    System.Double widthConstraint

    The available width for the element to use.

    System.Double heightConstraint

    The available height for the element to use.

    Returns
    Type Description
    Microsoft.Maui.Graphics.Size

    A Microsoft.Maui.Graphics.Size which contains the desired size of the element.

    Overrides
    SfView.MeasureContent(Double, Double)

    OnChildAdded(Element)

    Raises when child added.

    Declaration
    protected override void OnChildAdded(Element child)
    Parameters
    Type Name Description
    Microsoft.Maui.Controls.Element child

    Represents the child view which is added.

    OnChildRemoved(Element, Int32)

    Raises when child removed.

    Declaration
    protected override void OnChildRemoved(Element child, int oldLogicalIndex)
    Parameters
    Type Name Description
    Microsoft.Maui.Controls.Element child

    Represents the child view which is removed.

    System.Int32 oldLogicalIndex

    Represents the oldLogicalIndex.

    OnDraw(ICanvas, RectF)

    On Draw method is used to draw selection background.

    Declaration
    protected override void OnDraw(ICanvas canvas, RectF dirtyRect)
    Parameters
    Type Name Description
    Microsoft.Maui.Graphics.ICanvas canvas

    Draw graphical objects on a canvas that's defined as an ICanvas object.

    Microsoft.Maui.Graphics.RectF dirtyRect

    It defines the rectangular bounds.

    Overrides
    SfView.OnDraw(ICanvas, RectF)

    OnPropertyChanged(String)

    Invokes when property is updated at runtime.

    Declaration
    protected override void OnPropertyChanged(string propertyName = null)
    Parameters
    Type Name Description
    System.String propertyName

    Property name.

    Implements

    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved