In This Article

BarPopupButton Class

Represents a popup button control, for use within a ribbon or toolbar.

public class BarPopupButton : BarPopupButtonBase, IPopupAnchor
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl MenuBase Menu BarPopupButtonBase object
Derived:
BarSplitButton RibbonGalleryCollapsedButton
Implements:
IPopupAnchor

Constructors

BarPopupButton()

Initializes an instance of the class.

public BarPopupButton()

Properties

CanCloneToRibbonQuickAccessToolBar

Indicates whether the control can be cloned to the ribbon quick-access toolbar.

public bool CanCloneToRibbonQuickAccessToolBar { get; set; }

Property Value

bool:

true if the control can be cloned to the ribbon quick-access toolbar; otherwise, false. The default value is true.

ImageSourceResolved

The resolved ImageSource for the image to use in the control's template.

public ImageSource? ImageSourceResolved { get; }

Property Value

ImageSource

InvocationFocusBehavior

Indicates how the button processes focus when an item is clicked.

public InvocationFocusBehavior InvocationFocusBehavior { get; set; }

Property Value

InvocationFocusBehavior:

The default value is Default.

Key

A string that uniquely identifies the control.

[Localizability(LocalizationCategory.NeverLocalize)]
public string? Key { get; set; }

Property Value

string

LargeImageSource

The ImageSource for a large image, generally 32x32 size.

public ImageSource? LargeImageSource { get; set; }

Property Value

ImageSource

MediumImageSource

The ImageSource for a medium image, generally 24x24 size.

public ImageSource? MediumImageSource { get; set; }

Property Value

ImageSource

PopupIndicatorMargin

The Thickness of the margin around the popup indicator.

public Thickness PopupIndicatorMargin { get; set; }

Property Value

Thickness

ScreenTipFooter

The screen tip footer content.

public object? ScreenTipFooter { get; set; }

Property Value

object

ScreenTipHeader

The screen tip header content.

public object? ScreenTipHeader { get; set; }

Property Value

object

SmallImageSource

The ImageSource for a small image, generally 16x16 size.

public ImageSource? SmallImageSource { get; set; }

Property Value

ImageSource

Title

The string title, which can override the Label when displayed in screen tips and customization UI.

[Localizability(LocalizationCategory.Title)]
public string? Title { get; set; }

Property Value

string

ToolBarItemCollapseBehavior

The ItemCollapseBehavior for the control when in a ribbon using Simplified layout mode.

public ItemCollapseBehavior ToolBarItemCollapseBehavior { get; set; }

Property Value

ItemCollapseBehavior:

The default value is Default.

ToolBarItemVariantBehavior

The ItemVariantBehavior for the control when in a toolbar, which also applies when in a ribbon using Simplified layout mode.

public ItemVariantBehavior ToolBarItemVariantBehavior { get; set; }

Property Value

ItemVariantBehavior:

The default value is AlwaysSmall.

UserInterfaceDensity

A UserInterfaceDensity that indicates how compact or spacious the UI should appear.

public UserInterfaceDensity UserInterfaceDensity { get; set; }

Property Value

UserInterfaceDensity:

The default value is Compact.

VariantSize

The VariantSize currently assigned to the control.

public VariantSize VariantSize { get; set; }

Property Value

VariantSize

Remarks

This property should only be manually set when the control is standalone, and not hosted by a bar control.

Methods

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

OnCreateAutomationPeer()

Provides an appropriate MenuAutomationPeer implementation for this control, as part of the WPF automation infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

OnToolTipOpening(ToolTipEventArgs)

Invoked whenever the ToolTipOpening routed event reaches this class in its route. Implement this method to add class handling for this event.

protected override void OnToolTipOpening(ToolTipEventArgs e)
Parameter Type Description
e ToolTipEventArgs

Provides data about the event.

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

Fields

CanCloneToRibbonQuickAccessToolBarProperty

Defines the CanCloneToRibbonQuickAccessToolBar property.

public static readonly DependencyProperty CanCloneToRibbonQuickAccessToolBarProperty

ImageSourceResolvedProperty

Defines the ImageSourceResolved property.

public static readonly DependencyProperty ImageSourceResolvedProperty

InvocationFocusBehaviorProperty

Defines the InvocationFocusBehavior property.

public static readonly DependencyProperty InvocationFocusBehaviorProperty

KeyProperty

Defines the Key property.

public static readonly DependencyProperty KeyProperty

LargeImageSourceProperty

Defines the LargeImageSource property.

public static readonly DependencyProperty LargeImageSourceProperty

MediumImageSourceProperty

Defines the MediumImageSource property.

public static readonly DependencyProperty MediumImageSourceProperty

PopupIndicatorMarginProperty

Defines the PopupIndicatorMargin property.

public static readonly DependencyProperty PopupIndicatorMarginProperty

ScreenTipFooterProperty

Defines the ScreenTipFooter property.

public static readonly DependencyProperty ScreenTipFooterProperty

ScreenTipHeaderProperty

Defines the ScreenTipHeader property.

public static readonly DependencyProperty ScreenTipHeaderProperty

SmallImageSourceProperty

Defines the SmallImageSource property.

public static readonly DependencyProperty SmallImageSourceProperty

TitleProperty

Defines the Title property.

public static readonly DependencyProperty TitleProperty

ToolBarItemCollapseBehaviorProperty

Defines the ToolBarItemCollapseBehavior property.

public static readonly DependencyProperty ToolBarItemCollapseBehaviorProperty

ToolBarItemVariantBehaviorProperty

Defines the ToolBarItemVariantBehavior property.

public static readonly DependencyProperty ToolBarItemVariantBehaviorProperty

UserInterfaceDensityProperty

Defines the UserInterfaceDensity property.

public static readonly DependencyProperty UserInterfaceDensityProperty

VariantSizeProperty

Defines the VariantSize property.

public static readonly DependencyProperty VariantSizeProperty

Inherited Members

Extension Methods