Class TreeViewItem
Represents a item of data in a SfTreeView control.
Implements
Inherited Members
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
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 |
|---|---|---|
| Rect | bounds | Indicates the bounds value of the element. |
Returns
| Type | Description |
|---|---|
| Size | A Microsoft.Maui.Graphics.Size which contains the desired size of the element. |
Overrides
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 |
|---|---|---|
| double | widthConstraint | The available width for the element to use. |
| double | heightConstraint | The available height for the element to use. |
Returns
| Type | Description |
|---|---|
| Size | A Microsoft.Maui.Graphics.Size which contains the desired size of the element. |
Overrides
OnChildAdded(Element)
Raises when child added.
Declaration
protected override void OnChildAdded(Element child)
Parameters
| Type | Name | Description |
|---|---|---|
| Element | child | Represents the child view which is added. |
OnChildRemoved(Element, int)
Raises when child removed.
Declaration
protected override void OnChildRemoved(Element child, int oldLogicalIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| Element | child | Represents the child view which is removed. |
| int | 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 |
|---|---|---|
| ICanvas | canvas | Draw graphical objects on a canvas that's defined as an ICanvas object. |
| RectF | dirtyRect | It defines the rectangular bounds. |
Overrides
OnPropertyChanged(string)
Invokes when property is updated at runtime.
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Property name. |