BreadCrumbNode Class

A node within a BreadCrumbEdit control.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

public class BreadCrumbNode :
    ICloneable
Public Class BreadCrumbNode
    Implements ICloneable

Remarks

BreadCrumbEdit nodes are stored within a BreadCrumbNodeCollection object, assigned to this control's RepositoryItemBreadCrumbEdit.Nodes property. Nodes can display a caption and glyph, depending on their BreadCrumbNode.Caption, BreadCrumbNode.ImageIndex and BreadCrumbNode.ShowCaption properties. Each node can also have child nodes, stored within its BreadCrumbNode.ChildNodes collection. If this collection is empty, clicking this node's drop-down button has no effect. The figure below illustrates the main node elements.

BRC - Node Elements

When an end-user manually types a BreadCrumbEdit path (the control must be in Edit mode to do so, see the RepositoryItemBreadCrumbEdit.BreadCrumbMode property for details), a non-existing node can be typed. If this happens, the RepositoryItemBreadCrumbEdit.ValidatePath event is raised. You can handle this event to determine a path an end-user is going to navigate to, and based on this, cancel the navigation, or create a new node. If you choose to create a new node, the RepositoryItemBreadCrumbEdit.NewNodeAdding event first occurs. It indicates that a new node is about to be added. Handle this event to set up this new node's properties. Finally, the RepositoryItemBreadCrumbEdit.QueryChildNodes event fires. You can handle this event to populate the newly created node's BreadCrumbNode.ChildNodes collection. This mechanism allows you to dynamically create and populate nodes. See the Breadcrumb Edit Control topic to learn more.

Nodes can be regular or persistent. Regular nodes are visible only if they are part of the currently viewed nodes path (see the BreadCrumbEdit.Path property). Persistent nodes are nodes whose BreadCrumbNode.Persistent property equals true. Such nodes are always visible to end-users wherever they navigate. You can think of these nodes as an affix, which stands above the rest nodes tree and designed mostly to display short links to the most useful paths within this tree. Because of these persistent nodes' role, they should be root nodes. Do not add persistent nodes to the BreadCrumbNode.ChildNodes collection.

Use the RepositoryItemBreadCrumbEdit.SelectedNode property to set the last node selected within this BreadCrumbEdit.

Inheritance

Object
BreadCrumbNode
See Also