Breadcrumb Class
Represents a bread crumb control.
[StyleTypedProperty(Property = "ComboBoxItemContainerStyle", StyleTargetType = typeof(ComboBoxItem))]
[StyleTypedProperty(Property = "ItemContainerStyle", StyleTargetType = typeof(BreadcrumbItem))]
[StyleTypedProperty(Property = "MenuItemContainerExpandedStyle", StyleTargetType = typeof(MenuItem))]
[StyleTypedProperty(Property = "MenuItemContainerStyle", StyleTargetType = typeof(MenuItem))]
[TemplatePart(Name = "PART_EditingButton", Type = typeof(Button))]
[TemplatePart(Name = "PART_EditingComboBox", Type = typeof(ComboBox))]
public class Breadcrumb : Control, IBreadcrumbCommon
- Inheritance:
- object Visual UIElement FrameworkElement Control object
- Implements:
- IBreadcrumbCommon
Constructors
Breadcrumb()
Initializes an instance of the class.
public Breadcrumb()
Properties
ActionButtons
The action buttons shown on the right side of the Breadcrumb control.
public DeferrableObservableCollection<Button> ActionButtons { get; }
Property Value
AutoMinimizeItemCount
The number of items the Breadcrumb control will automatically minimize, starting from the RootContainer. The SelectedContainer will not be automatically minimized, button is included in the count.
ComboBoxDropDownToolTip
The tooltip to display on the drop-down button.
ComboBoxIsReadOnly
Indicates whether a value that enables selection-only mode, in which the contents of the embedded ComboBox control are selectable but not editable.
ComboBoxItemContainerStyle
The Style that is applied to the ComboBoxItem elements generated for items in the embedded ComboBox control.
ComboBoxItemContainerStyleSelector
Custom logic for choosing a Style that can be applied to ComboBoxItem elements generated by the embedded ComboBox control.
ComboBoxItemTemplate
The DataTemplate used to display each item in the embedded ComboBox control.
ComboBoxItemTemplateSelector
Custom logic for choosing a template used to display each item in the embedded ComboBox control.
public DataTemplateSelector? ComboBoxItemTemplateSelector { get; set; }
Property Value
ComboBoxItemsSource
A collection used to generate the content of the embedded ComboBox control.
ComboBoxStaysOpenOnEdit
Indicates whether the drop-down control for the embedded ComboBox control will remain open when a user clicks the TextBox.
ComboBoxTextPath
The TextSearch.TextPath used for the items in the embedded ComboBox control.
public string ComboBoxTextPath { get; set; }
Property Value
- string:
The default value is
string.Empty.
ImageMinWidth
The minimum width of the image displayed on the left side of the Breadcrumb.
[Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)]
[TypeConverter(typeof(LengthConverter))]
public double ImageMinWidth { get; set; }
Property Value
- double:
The default value is
16.0.
IsEditable
Indicates whether the Breadcrumb can enter edit mode. This is a dependency property.
IsEditing
Indicates whether the Breadcrumb is currently in edit mode. This is a dependency property.
IsOverflowButtonVisible
Indicates whether the overflow button is visible.
IsProgressBarVisible
Indicates whether the embedded AnimatedProgressBar control is visible.
ItemContainerStyle
The Style that is applied to BreadcrumbItem elements generated for items in the trail.
ItemContainerStyleSelector
Custom logic for choosing a Style that can be applied to BreadcrumbItem elements generated.
public StyleSelector? ItemContainerStyleSelector { get; set; }
Property Value
- StyleSelector:
A StyleSelector object that contains logic that chooses the Style to use as the ItemContainerStyle.
ItemMinimizedTemplate
The DataTemplate used to display each minimized item in the trail.
ItemMinimizedTemplateSelector
The custom logic for choosing a template used to display each minimized item in the trail.
public DataTemplateSelector? ItemMinimizedTemplateSelector { get; set; }
Property Value
ItemTemplate
The DataTemplate used to display each item in the trail.
ItemTemplateSelector
The custom logic for choosing a template used to display each item in the trail.
LogicalChildren
Gets an enumerator for logical child elements of this element.
protected override IEnumerator? LogicalChildren { get; }
Property Value
- IEnumerator:
An enumerator for logical child elements of this element.
MaxTailItemCount
The maximum number of tail BreadcrumbItem controls to display below the SelectedItem.
MenuHorizontalOffset
The horizontal distance between the target origin and the content menu alignment point.
MenuItemContainerExpandedStyle
MenuItemContainerExpandedStyleSelector
Custom logic for choosing a Style that can be applied to MenuItem elements generated for expanded items in context menus.
public StyleSelector? MenuItemContainerExpandedStyleSelector { get; set; }
Property Value
MenuItemContainerStyle
MenuItemContainerStyleSelector
Custom logic for choosing a Style that can be applied to MenuItem elements generated for items in context menus.
MenuItemExpandedTemplate
The DataTemplate used to display expanded items in a MenuItem.
MenuItemExpandedTemplateSelector
The custom logic for choosing a template used to display expanded items in a MenuItem.
public DataTemplateSelector? MenuItemExpandedTemplateSelector { get; set; }
Property Value
MenuItemTemplate
The DataTemplate used to display each item in a MenuItem.
MenuItemTemplateSelector
The custom logic for choosing a template used to display each item in a MenuItem.
public DataTemplateSelector? MenuItemTemplateSelector { get; set; }
Property Value
MenuVerticalOffset
The vertical distance between the target origin and the content menu alignment point.
PathSeparator
The path separator used by the control.
ProgressBarDecreaseDuration
The Duration of the decrease animation of the embedded AnimatedProgressBar control.
public Duration ProgressBarDecreaseDuration { get; set; }
Property Value
- Duration:
The default value is
500milliseconds.
Remarks
This property is not used when ProgressBarIsAnimationEnabled is set to false.
ProgressBarIncreaseDuration
The Duration of the increase animation of the embedded AnimatedProgressBar control.
public Duration ProgressBarIncreaseDuration { get; set; }
Property Value
- Duration:
The default value is
500milliseconds.
Remarks
This property is not used when ProgressBarIsAnimationEnabled is set to false.
ProgressBarIsAnimationEnabled
Indicates whether the embedded AnimatedProgressBar control should animate Value changes.
public bool ProgressBarIsAnimationEnabled { get; set; }
Property Value
- bool:
The default value is
true.
ProgressBarIsIndeterminate
Indicates whether the embedded AnimatedProgressBar control shows actual values or generic, continuous progress feedback.
public bool ProgressBarIsIndeterminate { get; set; }
Property Value
- bool:
The default value is
false.
ProgressBarMaximum
The highest possible ProgressBarValue of the embedded AnimatedProgressBar control.
ProgressBarMinimum
The lowest possible ProgressBarValue of the embedded AnimatedProgressBar control.
ProgressBarState
The state of the embedded AnimatedProgressBar control.
public OperationState ProgressBarState { get; set; }
Property Value
- OperationState:
The default value is Normal.
ProgressBarValue
The current value of the embedded AnimatedProgressBar control.
RootContainer
The BreadcrumbItem container for the RootItem.
RootItem
The root item in the Breadcrumb control.
SelectItem
The RoutedCommand used when a BreadcrumbItem is selected.
SelectedContainer
The container selected in the Breadcrumb control.
SelectedItem
The item selected in the Breadcrumb control.
SelectedPath
The selected path of the Breadcrumb.
TailItemOpacity
The opacity of tail items in the Breadcrumb control.
VisibleItemCount
The number of visible items in the Breadcrumb.
Methods
GetPath(object?)
The path string for the given item. By default, this method uses the PathConverter, if available,
to get the path for the given item.
protected virtual string GetPath(object? item)
| Parameter | Type | Description |
|---|---|---|
| item | object | The item. |
Returns
GetTrail(object?)
The location, which is a top-down list indicating the parent items for the specified source. By default, this
method uses the LocationConverter, if available, to get the location for the specified source.
protected virtual IList? GetTrail(object? item)
| Parameter | Type | Description |
|---|---|---|
| item | object | The item whose location should be returned. |
Returns
- IList:
The location for the specified item; otherwise
null.
GetTrail(string?)
The location, which is a top-down list indicating the parent items for the specified source. By default, this
method uses the LocationConverter, if available, to get the location for the specified source.
protected virtual IList? GetTrail(string? path)
| Parameter | Type | Description |
|---|---|---|
| path | string | The path to the item whose location should be returned. |
Returns
- IList:
The location for the specified path; otherwise
null.
MeasureOverride(Size)
Called to remeasure a control.
protected override Size MeasureOverride(Size constraint)
| Parameter | Type | Description |
|---|---|---|
| constraint | Size | The maximum size that the method can return. |
Returns
- Size:
The size of the control, up to the maximum specified by
constraint.
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
OnConvertItem(BreadcrumbConvertItemEventArgs)
Raises the ConvertItem event.
protected virtual void OnConvertItem(BreadcrumbConvertItemEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | BreadcrumbConvertItemEventArgs | The event data. |
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer? OnCreateAutomationPeer()
Returns
- AutomationPeer:
The type-specific AutomationPeer implementation.
OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
Invoked just before the IsKeyboardFocusWithinChanged event is raised by this element. Implement this method to add class handling for this event.
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | DependencyPropertyChangedEventArgs | A System.Windows.DependencyPropertyChangedEventArgs that contains the event data. |
OnKeyDown(KeyEventArgs)
Invoked when an unhandled System.Windows.Input.Keyboard.KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnKeyDown(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The KeyEventArgs that contains the event data. |
OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)
Invoked when an unhandled System.Windows.Input.Keyboard.LostKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyboardFocusChangedEventArgs | The KeyboardFocusChangedEventArgs that contains event data. |
OnMouseMove(MouseEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnMouseMove(MouseEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | MouseEventArgs | The MouseEventArgs that contains the event data. |
OnOverflowButtonClick(ContextMenuItemRoutedEventArgs)
Raises the OverflowButtonClick event.
protected virtual void OnOverflowButtonClick(ContextMenuItemRoutedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | ContextMenuItemRoutedEventArgs | The event data. |
OnPreviewKeyDown(KeyEventArgs)
Invoked when an unhandled System.Windows.Input.Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnPreviewKeyDown(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The KeyEventArgs that contains the event data. |
OnPropertyChanged(DependencyPropertyChangedEventArgs)
Invoked whenever the effective value of any dependency property on this FrameworkElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs).
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | DependencyPropertyChangedEventArgs | The event data that describes the property that changed, as well as old and new values. |
OnRootContainerChanged(BreadcrumbItem?, BreadcrumbItem?)
Invoked when the RootContainer property is changed.
protected virtual void OnRootContainerChanged(BreadcrumbItem? oldValue, BreadcrumbItem? newValue)
| Parameter | Type | Description |
|---|---|---|
| oldValue | BreadcrumbItem | The old property value. |
| newValue | BreadcrumbItem | The new property value. |
OnRootItemChanged(object?, object?)
Invoked when the RootItem property is changed.
protected virtual void OnRootItemChanged(object? oldValue, object? newValue)
| Parameter | Type | Description |
|---|---|---|
| oldValue | object | The old property value. |
| newValue | object | The new property value. |
OnSelectItem(ExecutedRoutedEventArgs)
Invoked when the SelectItem command is executed.
protected virtual void OnSelectItem(ExecutedRoutedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | ExecutedRoutedEventArgs | The ExecutedRoutedEventArgs instance containing the event data. |
Remarks
This method set the RootItem to the specified command parameter.
OnSelectedContainerChanged(BreadcrumbItem?, BreadcrumbItem?)
Invoked when the SelectedContainer property is changed.
protected virtual void OnSelectedContainerChanged(BreadcrumbItem? oldValue, BreadcrumbItem? newValue)
| Parameter | Type | Description |
|---|---|---|
| oldValue | BreadcrumbItem | The old property value. |
| newValue | BreadcrumbItem | The new property value. |
OnSelectedItemChanged(object?, object?)
Invoked when the SelectedItem property is changed.
protected virtual void OnSelectedItemChanged(object? oldValue, object? newValue)
| Parameter | Type | Description |
|---|---|---|
| oldValue | object | The old property value. |
| newValue | object | The new property value. |
OnSelectedPathChanged(string, string)
Invoked when the SelectedPath property is changed.
protected virtual void OnSelectedPathChanged(string oldValue, string newValue)
| Parameter | Type | Description |
|---|---|---|
| oldValue | string | The old property value. |
| newValue | string | The new property value. |
OnTemplateChanged(ControlTemplate, ControlTemplate)
Called whenever the control's template changes.
protected override void OnTemplateChanged(ControlTemplate oldTemplate, ControlTemplate newTemplate)
| Parameter | Type | Description |
|---|---|---|
| oldTemplate | ControlTemplate | The old template. |
| newTemplate | ControlTemplate | The new template. |
Events
ConvertItem
Occurs when the Breadcrumb needs a data item or path converted.
public event EventHandler<BreadcrumbConvertItemEventArgs> ConvertItem
Event Type
OverflowButtonClick
Occurs when the overflow button is clicked, allowing for customization of the ContextMenu it will display.
public event EventHandler<ContextMenuItemRoutedEventArgs> OverflowButtonClick
Event Type
RootContainerChanged
Occurs when the RootContainer is changed.
public event EventHandler<BreadcrumbItemPropertyChangedRoutedEventArgs> RootContainerChanged
Event Type
RootItemChanged
Occurs when the RootItem is changed.
public event EventHandler<ObjectPropertyChangedRoutedEventArgs> RootItemChanged
Event Type
SelectedContainerChanged
Occurs when the SelectedContainer is changed.
public event EventHandler<BreadcrumbItemPropertyChangedRoutedEventArgs> SelectedContainerChanged
Event Type
SelectedItemChanged
Occurs when the SelectedItem is changed.
public event EventHandler<ObjectPropertyChangedRoutedEventArgs> SelectedItemChanged
Event Type
SelectedPathChanged
Occurs when the SelectedPathChanged is changed.
public event EventHandler<StringPropertyChangedRoutedEventArgs> SelectedPathChanged
Event Type
Fields
AutoMinimizeItemCountProperty
Defines the AutoMinimizeItemCountProperty dependency property.
public static readonly DependencyProperty AutoMinimizeItemCountProperty
ComboBoxDropDownToolTipProperty
Defines the ComboBoxDropDownToolTipProperty dependency property.
public static readonly DependencyProperty ComboBoxDropDownToolTipProperty
ComboBoxIsReadOnlyProperty
Defines the ComboBoxIsReadOnlyProperty dependency property.
public static readonly DependencyProperty ComboBoxIsReadOnlyProperty
ComboBoxItemContainerStyleProperty
Defines the ComboBoxItemContainerStyleProperty dependency property.
public static readonly DependencyProperty ComboBoxItemContainerStyleProperty
ComboBoxItemContainerStyleSelectorProperty
Defines the ComboBoxItemContainerStyleSelectorProperty dependency property.
public static readonly DependencyProperty ComboBoxItemContainerStyleSelectorProperty
ComboBoxItemTemplateProperty
Defines the ComboBoxItemTemplateProperty dependency property.
public static readonly DependencyProperty ComboBoxItemTemplateProperty
ComboBoxItemTemplateSelectorProperty
Defines the ComboBoxItemTemplateSelectorProperty dependency property.
public static readonly DependencyProperty ComboBoxItemTemplateSelectorProperty
ComboBoxItemsSourceProperty
Defines the ComboBoxItemsSourceProperty dependency property.
public static readonly DependencyProperty ComboBoxItemsSourceProperty
ComboBoxStaysOpenOnEditProperty
Defines the ComboBoxStaysOpenOnEditProperty dependency property.
public static readonly DependencyProperty ComboBoxStaysOpenOnEditProperty
ComboBoxTextPathProperty
Defines the ComboBoxTextPathProperty dependency property.
public static readonly DependencyProperty ComboBoxTextPathProperty
ConvertItemEvent
Defines the ConvertItem routed event.
public static readonly RoutedEvent ConvertItemEvent
ImageMinWidthProperty
Defines the ImageMinWidthProperty dependency property.
public static readonly DependencyProperty ImageMinWidthProperty
IsEditableProperty
Defines the IsEditableProperty dependency property.
public static readonly DependencyProperty IsEditableProperty
IsEditingProperty
Defines the IsEditingProperty dependency property.
public static readonly DependencyProperty IsEditingProperty
IsOverflowButtonVisibleProperty
Defines the IsOverflowButtonVisibleProperty dependency property.
public static readonly DependencyProperty IsOverflowButtonVisibleProperty
IsProgressBarVisibleProperty
Defines the IsProgressBarVisibleProperty dependency property.
public static readonly DependencyProperty IsProgressBarVisibleProperty
ItemContainerStyleProperty
Defines the ItemContainerStyleProperty dependency property.
public static readonly DependencyProperty ItemContainerStyleProperty
ItemContainerStyleSelectorProperty
Defines the ItemContainerStyleSelectorProperty dependency property.
public static readonly DependencyProperty ItemContainerStyleSelectorProperty
ItemMinimizedTemplateProperty
Defines the ItemMinimizedTemplateProperty dependency property.
public static readonly DependencyProperty ItemMinimizedTemplateProperty
ItemMinimizedTemplateSelectorProperty
Defines the ItemMinimizedTemplateSelectorProperty dependency property.
public static readonly DependencyProperty ItemMinimizedTemplateSelectorProperty
ItemTemplateProperty
Defines the ItemTemplateProperty dependency property.
public static readonly DependencyProperty ItemTemplateProperty
ItemTemplateSelectorProperty
Defines the ItemTemplateSelectorProperty dependency property.
public static readonly DependencyProperty ItemTemplateSelectorProperty
MaxTailItemCountProperty
Defines the MaxTailItemCountProperty dependency property.
public static readonly DependencyProperty MaxTailItemCountProperty
MenuHorizontalOffsetProperty
Defines the MenuHorizontalOffsetProperty dependency property.
public static readonly DependencyProperty MenuHorizontalOffsetProperty
MenuItemContainerExpandedStyleProperty
Defines the MenuItemContainerExpandedStyleProperty dependency property.
public static readonly DependencyProperty MenuItemContainerExpandedStyleProperty
MenuItemContainerExpandedStyleSelectorProperty
Defines the MenuItemContainerExpandedStyleSelectorProperty dependency property.
public static readonly DependencyProperty MenuItemContainerExpandedStyleSelectorProperty
MenuItemContainerStyleProperty
Defines the MenuItemContainerStyleProperty dependency property.
public static readonly DependencyProperty MenuItemContainerStyleProperty
MenuItemContainerStyleSelectorProperty
Defines the MenuItemContainerStyleSelectorProperty dependency property.
public static readonly DependencyProperty MenuItemContainerStyleSelectorProperty
MenuItemExpandedTemplateProperty
Defines the MenuItemExpandedTemplateProperty dependency property.
public static readonly DependencyProperty MenuItemExpandedTemplateProperty
MenuItemExpandedTemplateSelectorProperty
Defines the MenuItemExpandedTemplateSelectorProperty dependency property.
public static readonly DependencyProperty MenuItemExpandedTemplateSelectorProperty
MenuItemTemplateProperty
Defines the MenuItemTemplateProperty dependency property.
public static readonly DependencyProperty MenuItemTemplateProperty
MenuItemTemplateSelectorProperty
Defines the MenuItemTemplateSelectorProperty dependency property.
public static readonly DependencyProperty MenuItemTemplateSelectorProperty
MenuVerticalOffsetProperty
Defines the MenuVerticalOffsetProperty dependency property.
public static readonly DependencyProperty MenuVerticalOffsetProperty
OverflowButtonClickEvent
Defines the OverflowButtonClick routed event.
public static readonly RoutedEvent OverflowButtonClickEvent
PathSeparatorProperty
Defines the PathSeparatorProperty dependency property.
public static readonly DependencyProperty PathSeparatorProperty
ProgressBarDecreaseDurationProperty
Defines the ProgressBarDecreaseDurationProperty dependency property.
public static readonly DependencyProperty ProgressBarDecreaseDurationProperty
ProgressBarIncreaseDurationProperty
Defines the ProgressBarIncreaseDurationProperty dependency property.
public static readonly DependencyProperty ProgressBarIncreaseDurationProperty
ProgressBarIsAnimationEnabledProperty
Defines the ProgressBarIsAnimationEnabledProperty dependency property.
public static readonly DependencyProperty ProgressBarIsAnimationEnabledProperty
ProgressBarIsIndeterminateProperty
Defines the ProgressBarIsIndeterminateProperty dependency property.
public static readonly DependencyProperty ProgressBarIsIndeterminateProperty
ProgressBarMaximumProperty
Defines the ProgressBarMaximumProperty dependency property.
public static readonly DependencyProperty ProgressBarMaximumProperty
ProgressBarMinimumProperty
Defines the ProgressBarMinimumProperty dependency property.
public static readonly DependencyProperty ProgressBarMinimumProperty
ProgressBarStateProperty
Defines the ProgressBarStateProperty dependency property.
public static readonly DependencyProperty ProgressBarStateProperty
ProgressBarValueProperty
Defines the ProgressBarValueProperty dependency property.
public static readonly DependencyProperty ProgressBarValueProperty
RootContainerChangedEvent
Defines the RootContainerChanged routed event.
public static readonly RoutedEvent RootContainerChangedEvent
RootContainerProperty
Defines the RootContainerProperty dependency property.
public static readonly DependencyProperty RootContainerProperty
RootItemChangedEvent
Defines the RootItemChanged routed event.
public static readonly RoutedEvent RootItemChangedEvent
RootItemProperty
Defines the RootItemProperty dependency property.
public static readonly DependencyProperty RootItemProperty
SelectedContainerChangedEvent
Defines the SelectedContainerChanged routed event.
public static readonly RoutedEvent SelectedContainerChangedEvent
SelectedContainerProperty
Defines the SelectedContainerProperty dependency property.
public static readonly DependencyProperty SelectedContainerProperty
SelectedItemChangedEvent
Defines the SelectedItemChanged routed event.
public static readonly RoutedEvent SelectedItemChangedEvent
SelectedItemProperty
Defines the SelectedItemProperty dependency property.
public static readonly DependencyProperty SelectedItemProperty
SelectedPathChangedEvent
Defines the SelectedPathChanged routed event.
public static readonly RoutedEvent SelectedPathChangedEvent
SelectedPathProperty
Defines the SelectedPathProperty dependency property.
public static readonly DependencyProperty SelectedPathProperty
TailItemOpacityProperty
Defines the TailItemOpacityProperty dependency property.
public static readonly DependencyProperty TailItemOpacityProperty
VisibleItemCountProperty
Defines the VisibleItemCountProperty dependency property.
public static readonly DependencyProperty VisibleItemCountProperty