System.Windows.Forms.TreeView.TreeViewNodeSorter Property

Gets or sets the implementation of IComparer to perform a custom sort of the System.Windows.Forms.TreeView nodes.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
public IComparer TreeViewNodeSorter { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The custom sort is applied when the TreeView.TreeViewNodeSorter is set.

If a System.Windows.Forms.TreeNode label is changed, you can call the TreeView.Sort method to sort the items again with the custom sorter specified by the TreeView.TreeViewNodeSorter property.

Note:

The default sorter uses the System.Globalization.CompareInfo.Compare(string, int, int, string, int, int) method based on the Application.CurrentCulture specified by the application. This means that System.Windows.Forms.TreeNode objects with equal value are kept in the order in which they were added to the System.Windows.Forms.TreeView control. This behavior may be different if a custom sort is applied.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0