Class RadBreadCrumbElement
Represents a breadcrumb navigation element that provides hierarchical path navigation with dropdown functionality, history tracking, and text editing capabilities.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadBreadCrumbElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadBreadCrumbElement()
Initializes a new instance of the RadBreadCrumbElement class.
Declaration
public RadBreadCrumbElement()
Fields
DefaultHeightProperty
Registers the DefaultHeight property for the RadBreadCrumbElement.
Declaration
public static RadProperty DefaultHeightProperty
Field Value
RadProperty
|
IsInEditModeProperty
Registers the IsInEditMode property for the RadBreadCrumbElement.
Declaration
public static RadProperty IsInEditModeProperty
Field Value
RadProperty
|
SpacingBetweenItemsProperty
Registers the SpacingBetweenItems property for the RadBreadCrumbElement.
Declaration
public static RadProperty SpacingBetweenItemsProperty
Field Value
RadProperty
|
Properties
AutoCompleteSuggestHelper
Gets the auto-complete suggest helper that provides text completion functionality in edit mode.
Declaration
public BreadCrumbAutoCompleteSuggestHelper AutoCompleteSuggestHelper { get; }
Property Value
BreadCrumbAutoCompleteSuggestHelper
|
ChildMember
Gets or sets the property name used to define child relationships in data binding. This property is ignored when DefaultTreeViewElement is set.
Declaration
public virtual string ChildMember { get; set; }
Property Value
System.String
|
DataMember
Gets or sets the name of the list or table in the data source for data binding. This property is ignored when DefaultTreeViewElement is set.
Declaration
public virtual string DataMember { get; set; }
Property Value
System.String
|
DataSource
Gets or sets the data source for the breadcrumb when using data binding. This property is ignored when DefaultTreeViewElement is set.
Declaration
public virtual object DataSource { get; set; }
Property Value
System.Object
|
DefaultHeight
Gets or sets the default height of the breadcrumb element in pixels.
Declaration
public int DefaultHeight { get; set; }
Property Value
System.Int32
|
DefaultTreeViewElement
Gets or sets the external RadTreeViewElement associated with the breadcrumb for navigation.
Declaration
public RadTreeViewElement DefaultTreeViewElement { get; set; }
Property Value
RadTreeViewElement
|
DisplayMember
Gets or sets the property name used to extract the display text from data items. This property is ignored when DefaultTreeViewElement is set.
Declaration
public virtual string DisplayMember { get; set; }
Property Value
System.String
|
HeaderDropDownButtonElement
Gets the dropdown button element that contains all collapsed and pinned items.
Declaration
public BreadCrumbDropDownButtonElement HeaderDropDownButtonElement { get; }
Property Value
BreadCrumbDropDownButtonElement
|
HistoryDropDownButtonElement
Gets the dropdown button element that provides access to navigation history.
Declaration
public BreadCrumbDropDownButtonElement HistoryDropDownButtonElement { get; }
Property Value
BreadCrumbDropDownButtonElement
|
ImageElement
Gets the LightVisualElement that displays the image of the selected node.
Declaration
public LightVisualElement ImageElement { get; }
Property Value
LightVisualElement
|
InternalTreeViewElement
Gets the internal RadTreeViewElement used by the breadcrumb when no DefaultTreeViewElement is set.
Declaration
public RadTreeViewElement InternalTreeViewElement { get; }
Property Value
RadTreeViewElement
|
IsAutoCompleteEnabled
Gets or sets a value indicating whether auto-complete functionality is enabled in edit mode. By default this property is true.
Declaration
public bool IsAutoCompleteEnabled { get; set; }
Property Value
System.Boolean
|
IsHistoryEnabled
Gets or sets a value indicating whether history tracking of visited paths is enabled. By default this property is false.
Declaration
public bool IsHistoryEnabled { get; set; }
Property Value
System.Boolean
|
IsTextModeEnabled
Gets or sets a value indicating whether text editing mode is enabled for the breadcrumb. By default this property is true.
Declaration
public bool IsTextModeEnabled { get; set; }
Property Value
System.Boolean
|
Items
Gets the collection of RadSplitButtonElement items that represent the path to the selected RadTreeNode.
Declaration
public RadItemOwnerCollection Items { get; }
Property Value
RadItemOwnerCollection
|
LeftElementsStack
Gets the StackLayoutPanel that contains the elements on the left side of the breadcrumb.
Declaration
public StackLayoutPanel LeftElementsStack { get; }
Property Value
StackLayoutPanel
|
MainStack
Gets the StackLayoutPanel that holds all breadcrumb Items.
Declaration
public StackLayoutPanel MainStack { get; }
Property Value
StackLayoutPanel
|
Nodes
Gets the collection of RadTreeNode objects from the InternalTreeViewElement.
Declaration
public RadTreeNodeCollection Nodes { get; }
Property Value
RadTreeNodeCollection
|
ParentMember
Gets or sets the property name used to define parent relationships in data binding. This property is ignored when DefaultTreeViewElement is set.
Declaration
public virtual string ParentMember { get; set; }
Property Value
System.String
|
ParseStringComparison
Gets or sets how node names are compared when the Parse(String) method is called.
Declaration
public StringComparison ParseStringComparison { get; set; }
Property Value
System.StringComparison
|
Path
Gets or sets the path to a RadTreeNode and selects it. Different elements in the node hierarchy must be separated by the PathSeparator.
Declaration
public string Path { get; set; }
Property Value
System.String
|
PathSeparator
Gets or sets the character used as path separator in breadcrumb navigation.
Declaration
public char PathSeparator { get; set; }
Property Value
System.Char
|
PinnedHeaderItems
Gets the collection of pinned menu items in the HeaderDropDownButtonElement. The pinned items are AssociatedMenuItem objects that provide shortcuts for faster navigation to predefined paths.
Declaration
public ObservableCollection<AssociatedMenuItem> PinnedHeaderItems { get; }
Property Value
ObservableCollection<AssociatedMenuItem>
|
PinnedItemsPosition
Gets or sets the position of PinnedHeaderItems in the HeaderDropDownButtonElement. The available options are Top and Bottom.
Declaration
public MenuItemsPosition PinnedItemsPosition { get; set; }
Property Value
MenuItemsPosition
|
RelationBindings
Gets the collection containing data binding settings for related data. This property is ignored when DefaultTreeViewElement is set.
Declaration
public virtual RelationBindingCollection RelationBindings { get; }
Property Value
RelationBindingCollection
|
RightElementsStack
Gets the StackLayoutPanel that contains the elements on the right side of the breadcrumb.
Declaration
public StackLayoutPanel RightElementsStack { get; }
Property Value
StackLayoutPanel
|
SelectTreeNodeOnClick
Gets or sets a value indicating whether a tree node will be selected when clicking on the action part of a split button element. When false, clicking the action part opens the dropdown menu.
Declaration
public bool SelectTreeNodeOnClick { get; set; }
Property Value
System.Boolean
|
ShowHiddenNodes
Gets or sets a value indicating whether to display hidden RadTreeNode objects. A hidden node has its Visible property set to false.
Declaration
public bool ShowHiddenNodes { get; set; }
Property Value
System.Boolean
|
SpacingBetweenItems
Gets or sets the spacing in pixels between breadcrumb items.
Declaration
public int SpacingBetweenItems { get; set; }
Property Value
System.Int32
|
TextBoxEditorElement
Gets the RadTextBoxElement used for text editing mode.
Declaration
public RadTextBoxElement TextBoxEditorElement { get; }
Property Value
RadTextBoxElement
|
ValueMember
Gets or sets the property name used to extract values from data items. This property is ignored when DefaultTreeViewElement is set.
Declaration
public virtual string ValueMember { get; set; }
Property Value
System.String
|
Methods
ArrangeOverride(SizeF)
Positions and sizes the child elements within the breadcrumb layout.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
The final area within which the element should arrange itself and its children. |
Returns
System.Drawing.SizeF
The actual size used by the element. |
Overrides
BeginEdit()
Begins text editing mode by showing the text editor and setting focus to it.
Declaration
public virtual void BeginEdit()
ClearCollapsedItems()
Clears the collapsed menu items from the header dropdown button.
Declaration
protected virtual void ClearCollapsedItems()
ClearRootItems()
Clears the root menu items from the header dropdown button.
Declaration
protected virtual void ClearRootItems()
CreateAutoCompleteSuggestHelper()
Creates a new instance of the auto-complete suggest helper for the breadcrumb.
Declaration
protected virtual BreadCrumbAutoCompleteSuggestHelper CreateAutoCompleteSuggestHelper()
Returns
BreadCrumbAutoCompleteSuggestHelper
A new BreadCrumbAutoCompleteSuggestHelper instance. |
CreateChildElements()
Creates and configures the child elements of the breadcrumb including stacks, buttons, and text editor.
Declaration
protected override void CreateChildElements()
Overrides
CreateDefaultTreeViewElement()
Creates the default tree view element for internal use.
Declaration
protected virtual RadTreeViewElement CreateDefaultTreeViewElement()
Returns
RadTreeViewElement
A new RadTreeViewElement instance for internal navigation. |
CreateHeaderDropDownButtonElement()
Creates the header dropdown button element that contains collapsed and pinned items.
Declaration
protected virtual BreadCrumbDropDownButtonElement CreateHeaderDropDownButtonElement()
Returns
BreadCrumbDropDownButtonElement
A new BreadCrumbDropDownButtonElement instance for the header. |
CreateHistoryDropDownButtonElement()
Creates the history dropdown button element that contains navigation history.
Declaration
protected virtual BreadCrumbDropDownButtonElement CreateHistoryDropDownButtonElement()
Returns
BreadCrumbDropDownButtonElement
A new BreadCrumbDropDownButtonElement instance for history. |
CreateImageElement()
Creates the image element that displays the icon of the selected node.
Declaration
protected virtual LightVisualElement CreateImageElement()
Returns
LightVisualElement
A new LightVisualElement instance for displaying images. |
CreateLeftElementsStack()
Creates the left elements stack panel for the breadcrumb.
Declaration
protected virtual StackLayoutPanel CreateLeftElementsStack()
Returns
StackLayoutPanel
A new StackLayoutPanel instance for the left elements. |
CreateMainElementsStack()
Creates the main elements stack panel that contains the breadcrumb items.
Declaration
protected virtual StackLayoutPanel CreateMainElementsStack()
Returns
StackLayoutPanel
A new StackLayoutPanel instance for the main breadcrumb items. |
CreateRightElementsStack()
Creates the right elements stack panel for the breadcrumb.
Declaration
protected virtual StackLayoutPanel CreateRightElementsStack()
Returns
StackLayoutPanel
A new StackLayoutPanel instance for the right elements. |
CreateSeparatorItem()
Creates a menu separator item for dropdown menus.
Declaration
protected virtual RadMenuSeparatorItem CreateSeparatorItem()
Returns
RadMenuSeparatorItem
A new RadMenuSeparatorItem instance for menu separation. |
CreateSplitButtonElement()
Creates a new split button element for breadcrumb navigation.
Declaration
protected virtual RadSplitButtonElement CreateSplitButtonElement()
Returns
RadSplitButtonElement
A new RadSplitButtonElement instance for navigation items. |
CreateTextBoxElement()
Creates the text box element used for text editing mode.
Declaration
protected virtual RadTextBoxElement CreateTextBoxElement()
Returns
RadTextBoxElement
A new RadTextBoxElement instance for text editing. |
EndEdit(Boolean)
Ends text editing mode and optionally submits the entered text for navigation.
Declaration
public virtual void EndEdit(bool submit)
Parameters
System.Boolean
submit
True to parse and navigate to the entered text; false to cancel editing. |
FindNodeFromToken(String, RadTreeNode)
Finds a tree node by the specified text token within the children of the given parent node.
Declaration
protected virtual RadTreeNode FindNodeFromToken(string token, RadTreeNode parentNode)
Parameters
System.String
token
The text to search for. |
RadTreeNode
parentNode
The parent node to search within, or null to search root level nodes. |
Returns
RadTreeNode
The matching RadTreeNode if found; otherwise, null. |
GetItemText(RadSplitButtonElement)
Gets the display text for the specified split button element.
Declaration
protected virtual string GetItemText(RadSplitButtonElement splitButton)
Parameters
RadSplitButtonElement
splitButton
The RadSplitButtonElement to get text for. |
Returns
System.String
The text of the split button. |
GetNodePath(RadTreeNode)
Gets the full path string for the specified tree node.
Declaration
public virtual string GetNodePath(RadTreeNode node)
Parameters
RadTreeNode
node
The RadTreeNode to get the path for. |
Returns
System.String
The full path string of the node, or empty string if node is null. |
GetNodesCount(RadTreeNodeCollection)
Recursively counts the total number of nodes in the specified node collection including all child nodes.
Declaration
public int GetNodesCount(RadTreeNodeCollection nodes)
Parameters
RadTreeNodeCollection
nodes
The RadTreeNodeCollection to count. |
Returns
System.Int32
The total number of nodes including all descendants. |
GetNodeText(RadTreeNode)
Gets the display text for the specified tree node.
Declaration
protected virtual string GetNodeText(RadTreeNode node)
Parameters
RadTreeNode
node
The RadTreeNode to get text for. |
Returns
System.String
The text of the node. |
GetPathFromItems()
Gets the current path string from the breadcrumb items.
Declaration
public virtual string GetPathFromItems()
Returns
System.String
The full path string of the currently selected item, or empty string if no items exist. |
GetRootNodes()
Gets the collection of root level tree nodes, filtering out hidden nodes if ShowHiddenNodes is false.
Declaration
protected virtual IList<RadTreeNode> GetRootNodes()
Returns
System.Collections.Generic.IList<RadTreeNode>
A list of root level RadTreeNode objects. |
InitializeFields()
Initializes the field values and configures default behavior for the breadcrumb element.
Declaration
protected override void InitializeFields()
Overrides
IsHeaderButtonPermanentlyVisible()
Determines whether the header button should be permanently visible based on pinned items and root nodes.
Declaration
protected virtual bool IsHeaderButtonPermanentlyVisible()
Returns
System.Boolean
True if the header button should always be visible; otherwise, false. |
MeasureOverride(SizeF)
Measures the desired size of the breadcrumb element and manages item collapsing based on available space.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
The available size that the element can be given. |
Returns
System.Drawing.SizeF
The desired size of the element. |
Overrides
OnAutoCompleteItemsCreated(Object, AutoCompleteItemsCreatedEventArgs)
Raises the AutoCompleteItemsCreated event.
Declaration
protected virtual void OnAutoCompleteItemsCreated(object sender, AutoCompleteItemsCreatedEventArgs e)
Parameters
System.Object
sender
The source of the event. |
AutoCompleteItemsCreatedEventArgs
e
An AutoCompleteItemsCreatedEventArgs that contains the event data. |
OnAutoCompleteItemsCreating(Object, AutoCompleteItemsCreatingEventArgs)
Raises the AutoCompleteItemsCreating event.
Declaration
protected virtual void OnAutoCompleteItemsCreating(object sender, AutoCompleteItemsCreatingEventArgs e)
Parameters
System.Object
sender
The source of the event. |
AutoCompleteItemsCreatingEventArgs
e
An AutoCompleteItemsCreatingEventArgs that contains the event data. |
OnCollapsedItemCreated(Object, AssociatedMenuItemEventArgs)
Raises the CollapsedItemCreated event.
Declaration
protected virtual void OnCollapsedItemCreated(object sender, AssociatedMenuItemEventArgs e)
Parameters
System.Object
sender
The source of the event. |
AssociatedMenuItemEventArgs
e
An AssociatedMenuItemEventArgs that contains the event data. |
OnCollapsedItemsCreated(Object, AssociatedMenuItemCollectionEventArgs)
Raises the CollapsedItemsCreated event.
Declaration
protected virtual void OnCollapsedItemsCreated(object sender, AssociatedMenuItemCollectionEventArgs e)
Parameters
System.Object
sender
The source of the event. |
AssociatedMenuItemCollectionEventArgs
e
An AssociatedMenuItemCollectionEventArgs that contains the event data. |
OnHistoryItemCreated(Object, AssociatedMenuItemEventArgs)
Raises the HistoryItemCreated event.
Declaration
protected virtual void OnHistoryItemCreated(object sender, AssociatedMenuItemEventArgs e)
Parameters
System.Object
sender
The source of the event. |
AssociatedMenuItemEventArgs
e
An AssociatedMenuItemEventArgs that contains the event data. |
OnKeyUp(KeyEventArgs)
Handles key up events for escape and enter keys to manage edit mode.
Declaration
protected override void OnKeyUp(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs
e
A System.Windows.Forms.KeyEventArgs that contains the event data. |
Overrides
OnMouseDown(MouseEventArgs)
Handles mouse down events and initiates edit mode when the breadcrumb background is clicked.
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
A System.Windows.Forms.MouseEventArgs that contains the event data. |
Overrides
OnPathParsed(Object, PathParsedEventArgs)
Raises the PathParsed event.
Declaration
protected virtual void OnPathParsed(object sender, PathParsedEventArgs e)
Parameters
System.Object
sender
The source of the event. |
PathParsedEventArgs
e
A PathParsedEventArgs that contains the event data. |
OnPathParsing(Object, PathParsingEventArgs)
Raises the PathParsing event.
Declaration
protected virtual void OnPathParsing(object sender, PathParsingEventArgs e)
Parameters
System.Object
sender
The source of the event. |
PathParsingEventArgs
e
A PathParsingEventArgs that contains the event data. |
OnPropertyChanged(RadPropertyChangedEventArgs)
Handles property change notifications and updates the breadcrumb display accordingly.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs
e
A RadPropertyChangedEventArgs that contains the event data. |
Overrides
OnRootNodesRequested(Object, TreeNodeCollectionEventArgs)
Raises the RootNodesRequested event.
Declaration
protected virtual void OnRootNodesRequested(object sender, TreeNodeCollectionEventArgs e)
Parameters
System.Object
sender
The source of the event. |
TreeNodeCollectionEventArgs
e
A TreeNodeCollectionEventArgs that contains the event data. |
OnSplitButtonCreated(Object, SplitButtonCreatedEventArgs)
Raises the SplitButtonCreated event.
Declaration
protected virtual void OnSplitButtonCreated(object sender, SplitButtonCreatedEventArgs e)
Parameters
System.Object
sender
The source of the event. |
SplitButtonCreatedEventArgs
e
A SplitButtonCreatedEventArgs that contains the event data. |
OnSplitButtonCreating(Object, SplitButtonCreatingEventArgs)
Raises the SplitButtonCreating event.
Declaration
protected virtual void OnSplitButtonCreating(object sender, SplitButtonCreatingEventArgs e)
Parameters
System.Object
sender
The source of the event. |
SplitButtonCreatingEventArgs
e
A SplitButtonCreatingEventArgs that contains the event data. |
Parse(String)
Navigates to a RadTreeNode by parsing the specified path string. Different elements in the node hierarchy must be separated by the PathSeparator.
Declaration
public virtual bool Parse(string path)
Parameters
System.String
path
The path string to navigate to. |
Returns
System.Boolean
True if the entire path is valid; false if only part of the path is valid or no element is valid. |
ParseCore(String, out Boolean)
Parses the specified path string and retrieves the corresponding tree node.
Declaration
public virtual RadTreeNode ParseCore(string path, out bool isWholePathValid)
Parameters
System.String
path
The path string to parse. |
System.Boolean
isWholePathValid
Returns true if the entire path is valid; false if only part of the path is valid or no element is valid. |
Returns
RadTreeNode
The last valid RadTreeNode found from the given path, or null if no valid node is found. |
ShouldArrangeChild(RadElement)
Determines whether the specified child element should be arranged by the layout system.
Declaration
protected override bool ShouldArrangeChild(RadElement child)
Parameters
RadElement
child
The child element to evaluate. |
Returns
System.Boolean
False for manually managed elements; otherwise, the base implementation result. |
Overrides
ShouldMeasureChild(RadElement)
Determines whether the specified child element should be measured by the layout system.
Declaration
protected override bool ShouldMeasureChild(RadElement child)
Parameters
RadElement
child
The child element to evaluate. |
Returns
System.Boolean
False for manually managed elements; otherwise, the base implementation result. |
Overrides
UpdateBreadCrumb(RadTreeNode)
Updates the breadcrumb display to reflect the specified tree node and its hierarchy.
Declaration
public void UpdateBreadCrumb(RadTreeNode node)
Parameters
RadTreeNode
node
The RadTreeNode to display in the breadcrumb. |
UpdateHeaderButtonItems()
Updates the header button dropdown items including pinned, root, and collapsed items.
Declaration
protected virtual void UpdateHeaderButtonItems()
UpdateHistory(RadTreeNode)
Updates the navigation history by adding the specified node to the history collection.
Declaration
protected virtual void UpdateHistory(RadTreeNode node)
Parameters
RadTreeNode
node
The RadTreeNode to add to the history. |
Events
AutoCompleteItemsCreated
Occurs when auto-complete items have been created, allowing modification of the auto-complete items collection.
Declaration
public event AutoCompleteItemsCreatedEventHandler AutoCompleteItemsCreated
Event Type
AutoCompleteItemsCreatedEventHandler
|
AutoCompleteItemsCreating
Occurs when auto-complete items are being created, allowing modification of the text used for generating auto-complete suggestions.
Declaration
public event AutoCompleteItemsCreatingEventHandler AutoCompleteItemsCreating
Event Type
AutoCompleteItemsCreatingEventHandler
|
CollapsedItemCreated
Occurs when there is insufficient space to display all items and a collapsed item is created.
Declaration
public event AssociatedMenuItemEventHandler CollapsedItemCreated
Event Type
AssociatedMenuItemEventHandler
|
CollapsedItemsCreated
Occurs when all collapsed items have been created, allowing modification of the collapsed items collection.
Declaration
public event AssociatedMenuItemCollectionEventHandler CollapsedItemsCreated
Event Type
AssociatedMenuItemCollectionEventHandler
|
HistoryItemCreated
Occurs when the user navigates to a new path and a history item is being created.
Declaration
public event AssociatedMenuItemEventHandler HistoryItemCreated
Event Type
AssociatedMenuItemEventHandler
|
PathParsed
Occurs when a path has been evaluated and a RadTreeNode is about to be selected in the breadcrumb.
Declaration
public event PathParsedEventHandler PathParsed
Event Type
PathParsedEventHandler
|
PathParsing
Occurs when a path is about to be parsed, allowing modification of the path or cancellation of the parse operation.
Declaration
public event PathParsingEventHandler PathParsing
Event Type
PathParsingEventHandler
|
RootNodesRequested
Occurs when root nodes are requested during the parse operation, allowing modification of the root nodes collection.
Declaration
public event TreeNodeCollectionEventHandler RootNodesRequested
Event Type
TreeNodeCollectionEventHandler
|
SplitButtonCreated
Occurs when a RadSplitButtonElement has been created, allowing customization of button properties and items.
Declaration
public event SplitButtonCreatedEventHandler SplitButtonCreated
Event Type
SplitButtonCreatedEventHandler
|
SplitButtonCreating
Occurs when a RadSplitButtonElement is being created, allowing replacement or cancellation of the button creation.
Declaration
public event SplitButtonCreatingEventHandler SplitButtonCreating
Event Type
SplitButtonCreatingEventHandler
|