TreeViewNative
An out-of-the-box treeview control that implements the ISupportTreeView interface.
public class TreeViewNative : TreeView, ISupportTreeView
Inherits from / implements: TreeView, ISupportTreeView
Remarks
If your treeview control that you want to host in the drop-down window is a standard TreeView control, then you could use this class in the place the standard treeview control, and add nodes to this instance and set the TreeViewNativeInstance property with the instance of this class.
Please refer to TreeViewNativeInstance property for a sample on this.
Members at a glance
TreeViewNative | Constructs a new instance of TreeViewNative. |
AccentColor | Gets or sets the colour of the selection and hover highlight in the modern style. Empty (the default) uses the system highlight colour. |
IsModernAppearanceEnabled | Gets or sets whether the tree is drawn in its modern style: taller rows, a chevron expander with room around it, a rounded selection and hover highlight, and top-level nodes in bold. When false the tree draws as a standard Windows tree view. |
Dispose | Releases the resources held by this TreeViewNative. |
OnAfterSelect | Raises the AfterSelect event. TreeViewNative overrides it so the control's own handling runs alongside the base behavior. |
OnDpiChangedAfterParent | Recomputes the modern style's row height and indent for the new display scale. |
OnDrawNode | Draws a node in the modern style: the row, the hover or selection highlight, the chevron expander and the text. |
OnFontChanged | Recomputes the modern style's row height for the new font. |
OnHandleCreated | Applies the modern style's row height and indent once the window exists. |
OnMouseLeave | Clears the modern style's hover highlight. |
OnMouseMove | Tracks the node under the pointer for the modern style's hover highlight. |
ToString | Returns a short description of this TreeViewNative, which is what the designer shows for the property. |
AfterSelect | Raises the required AfterSelect event, as prescribed in the ISupportTreeView interface. |
Constructors
TreeViewNative
Constructs a new instance of TreeViewNative.
Properties
AccentColor
Gets or sets the colour of the selection and hover highlight in the modern style. Empty (the default) uses the system highlight colour.
IsModernAppearanceEnabled
Gets or sets whether the tree is drawn in its modern style: taller rows, a chevron expander with room around it, a rounded selection and hover highlight, and top-level nodes in bold. When false the tree draws as a standard Windows tree view.
Methods
Dispose
Releases the resources held by this TreeViewNative.
- disposing
- true when called from
Dispose; false when called from the finalizer.
OnAfterSelect
Raises the AfterSelect event. TreeViewNative overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnDpiChangedAfterParent
Recomputes the modern style's row height and indent for the new display scale.
- e
- The data for the event.
OnDrawNode
Draws a node in the modern style: the row, the hover or selection highlight, the chevron expander and the text.
- e
- The data for the event.
OnFontChanged
Recomputes the modern style's row height for the new font.
- e
- The data for the event.
OnHandleCreated
Applies the modern style's row height and indent once the window exists.
- e
- The data for the event.
OnMouseLeave
Clears the modern style's hover highlight.
- e
- The data for the event.
OnMouseMove
Tracks the node under the pointer for the modern style's hover highlight.
- e
- The data for the event.
ToString
Returns a short description of this TreeViewNative, which is what the designer shows for the property.
Events
AfterSelect
Raises the required AfterSelect event, as prescribed in the ISupportTreeView interface.