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, 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
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
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
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. |