BreadcrumbItem Class
Represents an item in a Breadcrumb control.
[StyleTypedProperty(Property = "ItemContainerStyle", StyleTargetType = typeof(BreadcrumbItem))]
[StyleTypedProperty(Property = "MenuItemContainerExpandedStyle", StyleTargetType = typeof(MenuItem))]
[StyleTypedProperty(Property = "MenuItemContainerStyle", StyleTargetType = typeof(MenuItem))]
public class BreadcrumbItem : HeaderedItemsControl, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IGeneratorHost, IBreadcrumbCommon
- Inheritance:
- Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control ItemsControl HeaderedItemsControl Object
- Implements:
- IBreadcrumbCommon
Constructors
BreadcrumbItem()
Initializes a new instance of the BreadcrumbItem class.
public BreadcrumbItem()
Properties
ConstrainedWidth
Gets a value indicating the constrained width of the BreadcrumbItem. This is a dependency property.
public double ConstrainedWidth { get; }
Property Value
- Double:
The width of the constrained. The default is
0.0
ContainsSelection
Gets a value indicating whether the BreadcrumbItem contains the item selected in the associated Breadcrumb control. This is a dependency property.
public bool ContainsSelection { get; }
Property Value
- Boolean:
true
if contains the selected BreadcrumbItem; otherwise,false
.
ExpandedContainer
Gets the BreadcrumbItem container for the ExpandedItem. This is a dependency property.
ExpandedItem
Gets or sets the next expanded item in the Breadcrumb. This is a dependency property.
ImageSource
Gets or sets the image that appears in the Breadcrumb when the BreadcrumbItem is selected. This is a dependency property.
IsMinimized
Gets a value indicating whether the BreadcrumbItem is minimized. This is a dependency property.
public bool IsMinimized { get; }
Property Value
- Boolean:
true
if the BreadcrumbItem is minimized; otherwise,false
.
IsOverflowed
Gets a value indicating whether the header for the BreadcrumbItem has been moved to an overflow drop-down because of limited space in the associated Breadcrumb control. This is a dependency property.
public bool IsOverflowed { get; }
Property Value
- Boolean:
true
if the BreadcrumbItem has been moved to an overflow drop-down; otherwise,false
.
IsSelected
Gets or sets whether a BreadcrumbItem control is selected. This is a dependency property.
public bool IsSelected { get; set; }
Property Value
- Boolean:
true
if the BreadcrumbItem is selected; otherwise,false
. The default isfalse
.
Remarks
When the IsSelected property value changes to true
, the Selected event occurs. When the
IsSelected property value changes to false
, the Unselected event occurs.
IsTailItem
Gets a value indicating whether the BreadcrumbItem is a tail item. This is a dependency property.
public bool IsTailItem { get; }
Property Value
- Boolean:
true
if the BreadcrumbItem is a tail item; otherwise,false
.
IsWidthConstrained
Gets a value indicating whether the width of the BreadcrumbItem is constrained. This is a dependency property.
public bool IsWidthConstrained { get; }
Property Value
- Boolean:
true
if the width of the BreadcrumbItem is constrained; otherwise,false
.
ItemMinimizedTemplate
Gets or sets the DataTemplate used to display each minimized item in the trail. This is a dependency property.
public DataTemplate ItemMinimizedTemplate { get; set; }
Property Value
- DataTemplate:
A DataTemplate that specifies the visualization of the minimized data objects. The default is null.
ItemMinimizedTemplateSelector
Gets or sets the custom logic for choosing a template used to display each minimized item in the trail. This is a dependency property.
public DataTemplateSelector ItemMinimizedTemplateSelector { get; set; }
Property Value
- DataTemplateSelector:
A custom DataTemplateSelector object that provides logic and returns a DataTemplate. The default is null.
LogicalChildren
Gets an enumerator for logical child elements of this element.
MenuHorizontalOffset
Gets or sets the horizontal distance between the target origin and the content menu alignment point. This is a dependency property.
public double MenuHorizontalOffset { get; set; }
Property Value
- Double:
The horizontal distance between the target origin and the context menu alignment point. The default is
0
.
MenuItemContainerExpandedStyle
Gets or sets the Style that is applied to the MenuItem elements generated for expanded items in context menus. This is a dependency property.
public Style MenuItemContainerExpandedStyle { get; set; }
Property Value
MenuItemContainerExpandedStyleSelector
Gets or sets custom logic for choosing a Style that can be applied to MenuItem elements generated for expanded items in context menus. This is a dependency property.
public StyleSelector MenuItemContainerExpandedStyleSelector { get; set; }
Property Value
- StyleSelector:
A StyleSelector object that contains logic that chooses the Style to use as the MenuItemContainerExpandedStyle. The default is null.
MenuItemContainerStyle
Gets or sets the Style that is applied to the MenuItem elements generated for items in context menus. This is a dependency property.
public Style MenuItemContainerStyle { get; set; }
Property Value
MenuItemContainerStyleSelector
Gets or sets custom logic for choosing a Style that can be applied to MenuItem elements generated for items in context menus. This is a dependency property.
public StyleSelector MenuItemContainerStyleSelector { get; set; }
Property Value
- StyleSelector:
A StyleSelector object that contains logic that chooses the Style to use as the MenuItemContainerStyle. The default is null.
MenuItemExpandedTemplate
Gets or sets the DataTemplate used to display expanded items in a MenuItem. This is a dependency property.
public DataTemplate MenuItemExpandedTemplate { get; set; }
Property Value
- DataTemplate:
A DataTemplate that specifies the visualization of expanded data objects when displayed in a MenuItem. The default is null.
MenuItemExpandedTemplateSelector
Gets or sets the custom logic for choosing a template used to display expanded items in a MenuItem. This is a dependency property.
public DataTemplateSelector MenuItemExpandedTemplateSelector { get; set; }
Property Value
- DataTemplateSelector:
A custom DataTemplateSelector object that provides logic and returns a DataTemplate. The default is null.
MenuItemTemplate
Gets or sets the DataTemplate used to display each item in a MenuItem. This is a dependency property.
public DataTemplate MenuItemTemplate { get; set; }
Property Value
- DataTemplate:
A DataTemplate that specifies the visualization of data objects when displayed in a MenuItem. The default is null.
MenuItemTemplateSelector
Gets or sets the custom logic for choosing a template used to display each item in a MenuItem. This is a dependency property.
public DataTemplateSelector MenuItemTemplateSelector { get; set; }
Property Value
- DataTemplateSelector:
A custom DataTemplateSelector object that provides logic and returns a DataTemplate. The default is null.
MenuVerticalOffset
Gets or sets the vertical distance between the target origin and the content menu alignment point. This is a dependency property.
public double MenuVerticalOffset { get; set; }
Property Value
- Double:
The vertical distance between the target origin and the context menu alignment point. The default is
0
.
PathEntry
Gets or sets the path entry of this item. This is a dependency property.
[Localizability(LocalizationCategory.Title)]
public string PathEntry { get; set; }
Property Value
- String:
The path entry of this item. The default is null.
TailIndex
Gets the position of the BreadcrumbItem below the selected item. If the BreadcrumbItem is the selected item or contains the selected item, then the index will be -1. This is a dependency property.
Methods
GetLastContainer()
Gets the last BreadcrumbItem, which may be this BreadcrumbItem.
GetLastItem()
Gets the last data item, which may be associated with this BreadcrumbItem.
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
.
OnItemsChanged(NotifyCollectionChangedEventArgs)
Invoked when the Items property changes.
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameter | Type | Description |
---|---|---|
e | NotifyCollectionChangedEventArgs | Information about the change. |
OnNavigateButtonClick(ContextMenuItemRoutedEventArgs)
Raises the NavigateButtonClick event.
protected virtual void OnNavigateButtonClick(ContextMenuItemRoutedEventArgs e)
Parameter | Type | Description |
---|---|---|
e | ContextMenuItemRoutedEventArgs | An |
OnSelected()
Raises the Selected event.
protected virtual void OnSelected()
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
When the command parameter is null, then this BreadcrumbItem should be selected; otherwise the specified item should be selected.
OnUnselected()
Raises the Unselected event.
protected virtual void OnUnselected()
OnVisualParentChanged(DependencyObject)
Invoked when the parent of this element in the visual tree is changed. When the visual parent is changed, the
BreadcrumbItem will be selected in the new parent if IsSelected is true
.
protected override void OnVisualParentChanged(DependencyObject oldParent)
Parameter | Type | Description |
---|---|---|
oldParent | DependencyObject | The old parent element. May be null to indicate that the element did not have a visual parent previously. |
Events
NavigateButtonClick
Occurs when the navigate button is clicked, allowing for customization of the ContextMenu
it will display.
public event EventHandler<ContextMenuItemRoutedEventArgs> NavigateButtonClick
Event Type
Selected
Occurs when the IsSelected property changes from false
to true
.
public event RoutedEventHandler Selected
Event Type
Remarks
The event occurs when a BreadcrumbItem becomes the selected BreadcrumbItem in a Breadcrumb control. This event is related to the SelectedItemChanged event that occurs when there is a change in the SelectedItem property of a Breadcrumb control.
Unselected
Occurs when the IsSelected property changes from true
to false
.
public event RoutedEventHandler Unselected
Event Type
Remarks
The event occurs when the selection changes from this BreadcrumbItem to another BreadcrumbItem in a Breadcrumb control. This event is related to the SelectedItemChanged event that occurs when there is a change in the SelectedItem property of a Breadcrumb control.
Explicit Interface Implementations
IBreadcrumbCommon.get_ItemContainerStyle()
IBreadcrumbCommon.get_ItemContainerStyleSelector()
IBreadcrumbCommon.get_ItemTemplate()
IBreadcrumbCommon.get_ItemTemplateSelector()
IBreadcrumbCommon.set_ItemContainerStyle(Style)
void IBreadcrumbCommon.set_ItemContainerStyle(Style value)
Parameter | Type | Description |
---|---|---|
value | Style |
IBreadcrumbCommon.set_ItemContainerStyleSelector(StyleSelector)
void IBreadcrumbCommon.set_ItemContainerStyleSelector(StyleSelector value)
Parameter | Type | Description |
---|---|---|
value | StyleSelector |
IBreadcrumbCommon.set_ItemTemplate(DataTemplate)
void IBreadcrumbCommon.set_ItemTemplate(DataTemplate value)
Parameter | Type | Description |
---|---|---|
value | DataTemplate |
IBreadcrumbCommon.set_ItemTemplateSelector(DataTemplateSelector)
void IBreadcrumbCommon.set_ItemTemplateSelector(DataTemplateSelector value)
Parameter | Type | Description |
---|---|---|
value | DataTemplateSelector |
Fields
ConstrainedWidthProperty
Identifies the read-only ConstrainedWidth dependency property. This field is read-only.
public static readonly DependencyProperty ConstrainedWidthProperty
ContainsSelectionProperty
Identifies the read-only ContainsSelection dependency property. This field is read-only.
public static readonly DependencyProperty ContainsSelectionProperty
ExpandedContainerProperty
Identifies the read-only ExpandedContainer dependency property. This field is read-only.
public static readonly DependencyProperty ExpandedContainerProperty
ExpandedItemProperty
Identifies the read-only ExpandedItem dependency property. This field is read-only.
public static readonly DependencyProperty ExpandedItemProperty
ImageSourceProperty
Identifies the ImageSource dependency property. This field is read-only.
public static readonly DependencyProperty ImageSourceProperty
IsMinimizedProperty
Identifies the read-only IsMinimized dependency property. This field is read-only.
public static readonly DependencyProperty IsMinimizedProperty
IsOverflowedProperty
Identifies the read-only IsOverflowed dependency property. This field is read-only.
public static readonly DependencyProperty IsOverflowedProperty
IsSelectedProperty
Identifies the IsSelected dependency property. This field is read-only.
public static readonly DependencyProperty IsSelectedProperty
IsTailItemProperty
Identifies the read-only IsTailItem dependency property. This field is read-only.
public static readonly DependencyProperty IsTailItemProperty
IsWidthConstrainedProperty
Identifies the read-only IsWidthConstrained dependency property. This field is read-only.
public static readonly DependencyProperty IsWidthConstrainedProperty
ItemMinimizedTemplateProperty
Identifies the ItemMinimizedTemplate dependency property. This field is read-only.
public static readonly DependencyProperty ItemMinimizedTemplateProperty
ItemMinimizedTemplateSelectorProperty
Identifies the ItemMinimizedTemplateSelector dependency property. This field is read-only.
public static readonly DependencyProperty ItemMinimizedTemplateSelectorProperty
MenuHorizontalOffsetProperty
Identifies the MenuHorizontalOffset dependency property. This field is read-only.
public static readonly DependencyProperty MenuHorizontalOffsetProperty
MenuItemContainerExpandedStyleProperty
Identifies the MenuItemContainerExpandedStyle dependency property. This field is read-only.
public static readonly DependencyProperty MenuItemContainerExpandedStyleProperty
MenuItemContainerExpandedStyleSelectorProperty
Identifies the MenuItemContainerExpandedStyleSelector dependency property. This field is read-only.
public static readonly DependencyProperty MenuItemContainerExpandedStyleSelectorProperty
MenuItemContainerStyleProperty
Identifies the MenuItemContainerStyle dependency property. This field is read-only.
public static readonly DependencyProperty MenuItemContainerStyleProperty
MenuItemContainerStyleSelectorProperty
Identifies the MenuItemContainerStyleSelector dependency property. This field is read-only.
public static readonly DependencyProperty MenuItemContainerStyleSelectorProperty
MenuItemExpandedTemplateProperty
Identifies the MenuItemExpandedTemplate dependency property. This field is read-only.
public static readonly DependencyProperty MenuItemExpandedTemplateProperty
MenuItemExpandedTemplateSelectorProperty
Identifies the MenuItemExpandedTemplateSelector dependency property. This field is read-only.
public static readonly DependencyProperty MenuItemExpandedTemplateSelectorProperty
MenuItemTemplateProperty
Identifies the MenuItemTemplate dependency property. This field is read-only.
public static readonly DependencyProperty MenuItemTemplateProperty
MenuItemTemplateSelectorProperty
Identifies the MenuItemTemplateSelector dependency property. This field is read-only.
public static readonly DependencyProperty MenuItemTemplateSelectorProperty
MenuVerticalOffsetProperty
Identifies the MenuVerticalOffset dependency property. This field is read-only.
public static readonly DependencyProperty MenuVerticalOffsetProperty
NavigateButtonClickEvent
Identifies the NavigateButtonClick
routed event. This field is read-only.
public static readonly RoutedEvent NavigateButtonClickEvent
PathEntryProperty
Identifies the PathEntry dependency property. This field is read-only.
public static readonly DependencyProperty PathEntryProperty
SelectedEvent
Identifies the Selected routed event. This field is read-only.
public static readonly RoutedEvent SelectedEvent
TailIndexProperty
Identifies the read-only TailIndex dependency property. This field is read-only.
public static readonly DependencyProperty TailIndexProperty
UnselectedEvent
Identifies the Unselected routed event. This field is read-only.
public static readonly RoutedEvent UnselectedEvent
Inherited Members
- Object.ToString()
- Object.Equals(Object)
- Object.Equals(Object, Object)
- Object.ReferenceEquals(Object, Object)
- Object.GetHashCode()
- Object.GetType()
- Object.MemberwiseClone()