TreeNodeElement
Renders a single RadTreeNode as a row within the tree, composing the expander, image, toggle (check box) and content sub-elements.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class TreeNodeElement : StackLayoutElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IVirtualizedElement<RadTreeNode>
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementStackLayoutElementTreeNodeElement...
Derived Classes:
Implements:
Inherited Members
Constructors
public TreeNodeElement()
Fields
protected const long AlrternatingColorSetState = 1
Identifies the dependency property that controls whether selection highlighting spans the full row width instead of only the label.
public static RadProperty FullRowSelectProperty
protected const long FullRowSelectState = 2
Identifies the dependency property that indicates whether an expander should be shown because the node has child nodes.
public static RadProperty HasChildrenProperty
Identifies the dependency property that controls whether the node highlights when the mouse hovers over it.
public static RadProperty HotTrackingProperty
Identifies the dependency property that reflects whether the owning tree view control currently lacks input focus.
public static RadProperty IsControlInactiveProperty
Identifies the dependency property that controls whether the node has keyboard focus within the tree.
public static RadProperty IsCurrentProperty
Identifies the dependency property that controls whether the node's children are visible.
public static RadProperty IsExpandedProperty
Identifies the dependency property that indicates whether the node has no parent node.
public static RadProperty IsRootNodeProperty
Identifies the dependency property that controls whether the node is rendered as selected.
public static RadProperty IsSelectedProperty
Identifies the dependency property that specifies a fixed row height for the node, or -1 to size automatically.
public static RadProperty ItemHeightProperty
protected const long UpdateCheckStateByKeyboard = 16
protected const long UpdateCheckStateByMouse = 8
protected const long UpdateScrollRangeIfNeeded = 4
Properties
protected bool CheckedByKeyboard { get; set; }
protected bool CheckedByMouse { get; set; }
Gets the element that renders the node's text.
public TreeNodeContentElement ContentElement { get; }
Gets the data node this visual element currently represents.
public RadTreeNode Data { get; }
Implements:
public IInputEditor Editor { get; }
Gets the element used to expand or collapse the node's children.
public TreeNodeExpanderItem ExpanderElement { get; }
Gets a value indicating whether this node contains child nodes.
public virtual bool HasChildren { get; }
Gets a value indicating that this is the hot tracking node.
public virtual bool HotTracking { get; }
Gets the element that renders the node's icon.
public TreeNodeImageElement ImageElement { get; }
Gets or sets a value indicating whether the control contains the focus.
public virtual bool IsControlFocused { get; }
Gets or sets a value indicating that this is the current node.
public virtual bool IsCurrent { get; }
Gets or sets a value indicating whether the node is expanded.
public virtual bool IsExpanded { get; }
public bool IsInEditMode { get; }
Gets a value indicating whether the node is currently at root level.
public virtual bool IsRootNode { get; }
Gets or sets a value indicating whether the node is selected.
public virtual bool IsSelected { get; }
Gets or sets the arbitrary height for this particular node. Valid when the owning RadTreeViewElement's AllowArbitraryHeight property is set to true.
public virtual int ItemHeight { get; set; }
Gets the element that draws the connecting lines between this node and its parent/siblings.
public TreeNodeLinesContainer LinesContainerElement { get; }
Gets the check box or radio button element shown when the node is checkable, or null otherwise.
public RadToggleButtonElement ToggleElement { get; }
public override string ToolTipText { get; set; }
Overrides:
Gets the tree view element that owns this node.
public RadTreeViewElement TreeViewElement { get; }
Methods
protected virtual void ApplyStyle()
Arranges the content and child elements within the final allocated space, positioning text, images, and child elements.
Associates this reusable visual element with the specified data node, refreshing its state to reflect the new data (used by virtualization).
public virtual void Attach(RadTreeNode data, object context)
Implements:
Called by the element when constructed. Allows inheritors to build the element tree.
protected override void CreateChildElements()
Overrides:
Creates the element responsible for rendering the node's text and image content.
Creates the check box or radio button element appropriate for the node's CheckType, or null if the node is not checkable.
Releases the association with the currently attached data node so the element can be recycled for another node.
public virtual void Detach()
Implements:
Disposes of managed resources including cached images and SVG images when the element is being disposed.
protected override void DisposeManagedResources()
Overrides:
protected virtual void DisposeToggleElement()
Gets the image to be used as a hint when this element is being dragged.
protected override Image GetDragHintCore()
An image representing the drag hint for this element.
Overrides:
Initializes the internal fields and components of the LightVisualElement. This method sets up text primitives, image primitives, and layout management components.
protected override void InitializeFields()
Overrides:
Determines whether this element can be reused to represent the specified data node without recreating it (used by virtualization).
public virtual bool IsCompatible(RadTreeNode data, object context)
Implements:
Measures the desired size of the element by calculating the space needed for content, padding, and borders.
Raises the Click event.
Raises the DoubleClick event.
protected virtual void OnFormatting()
Called when a mouse button is pressed down over the item.
protected override void OnMouseDown(MouseEventArgs e)
The mouse event arguments.
Overrides:
Called when the mouse moves over the item, handling highlight and border highlight effects.
protected override void OnMouseMove(MouseEventArgs e)
The mouse event arguments.
Overrides:
Called when a mouse button is released over the item.
protected override void OnMouseUp(MouseEventArgs e)
The mouse event arguments.
Overrides:
protected virtual void OnNodePropertyChanged(PropertyChangedEventArgs e)
Handles property change events by invalidating the fill cache and invoking the base class property change handler.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Event arguments containing information about the property that changed.
Overrides:
Refreshes the element's child sub-elements (image, toggle, content) to match the attached node's current state.
public virtual void Synchronize()
Implements:
protected virtual void SynchronizeToggleElement()