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