In This Article

BreadcrumbButtonBase Class

Represents a button that shows a ContextMenu and is used in a Breadcrumb.

public abstract class BreadcrumbButtonBase : PopupButton, IPopupAnchor
Inheritance:
object Visual UIElement FrameworkElement Control ContentControl ButtonBase Button PopupButton object
Derived:
BreadcrumbItemNavigateButton BreadcrumbOverflowButton
Implements:
IPopupAnchor

Constructors

BreadcrumbButtonBase()

Initializes an instance of the class.

protected BreadcrumbButtonBase()

Methods

Close()

Closes the drop-down if it is open.

public void Close()

CreateMenuItem(object?, IBreadcrumbCommon?, bool, IInputElement?, object?)

Creates a MenuItem from the specified parameters.

protected static MenuItem CreateMenuItem(object? data, IBreadcrumbCommon? breadcrumbCommon, bool isExpanded, IInputElement? commandTarget, object? commandParameter = null)
Parameter Type Description
data object

The data.

breadcrumbCommon IBreadcrumbCommon

A control that implements IBreadcrumbCommon, which supplies the Style and DataTemplate that should be used for the MenuItem created. Both Breadcrumb and BreadcrumbItem implement the IBreadcrumbCommon interface.

isExpanded bool

if set to true then the given item is currently expanded.

commandTarget IInputElement

The command target.

commandParameter object

The command parameter.

Returns

MenuItem:

A MenuItem that can be used in the popup.

GenerateContextMenu()

Generates a ContextMenu to be shown by the BreadcrumbButtonBase.

protected abstract ContextMenu? GenerateContextMenu()

Returns

ContextMenu:

A ContextMenu; otherwise null.

OnPopupOpening(CancelRoutedEventArgs)

Occurs before the IsPopupOpen property changes to true.

protected override void OnPopupOpening(CancelRoutedEventArgs e)
Parameter Type Description
e CancelRoutedEventArgs

The CancelRoutedEventArgs that contains the event data.

Remarks

This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.

Inherited Members

Extension Methods