In This Article

BarGalleryItem Class

Represents an item within a bar gallery control.

public class BarGalleryItem : ContentControl
Inheritance:
object Visual UIElement FrameworkElement Control ContentControl object

Constructors

BarGalleryItem()

Initializes an instance of the class.

public BarGalleryItem()

See Also

Properties

HasHighlight

Indicates whether the gallery item should be highlighted.

public bool HasHighlight { get; }

Property Value

bool:

true if the gallery item should be highlighted; otherwise, false.

See Also

IsHighlighted

Indicates whether the gallery item is currently highlighted.

public bool IsHighlighted { get; set; }

Property Value

bool:

true if the gallery item is currently highlighted; otherwise, false. The default value is false.

See Also

IsPressed

Indicates whether the gallery item is currently pressed.

public bool IsPressed { get; }

Property Value

bool:

true if the gallery item is currently pressed; otherwise, false.

See Also

IsSelected

Indicates whether the gallery item is currently selected.

public bool IsSelected { get; set; }

Property Value

bool:

true if the gallery item is currently selected; otherwise, false. The default value is false.

See Also

KeyTipText

The key tip text used to access the control.

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

Property Value

string

See Also

Label

The text label to display.

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

Property Value

string

See Also

LayoutBehavior

A BarGalleryItemLayoutBehavior indicating how the gallery item should be visually displayed.

public BarGalleryItemLayoutBehavior LayoutBehavior { get; set; }

Property Value

BarGalleryItemLayoutBehavior:

The default value is Default.

See Also

ScreenTipFooter

The screen tip footer content.

public object? ScreenTipFooter { get; set; }

Property Value

object

See Also

ScreenTipHeader

The screen tip header content.

public object? ScreenTipHeader { get; set; }

Property Value

object

See Also

UseAccentedBorder

Indicates whether to use an accented item border, common when they have vibrant content such as color swatches.

public bool UseAccentedBorder { get; set; }

Property Value

bool:

true if an accented item border should be used; otherwise, false. The default value is false.

See Also

UseMenuItemAppearance

Indicates whether to use a menu item appearance, common for single-column menu galleries.

public bool UseMenuItemAppearance { get; set; }

Property Value

bool:

true if a menu item appearance should be used; otherwise, false. The default value is false.

See Also

Methods

OnCreateAutomationPeer()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

See Also

OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)

Invoked when an unhandled System.Windows.Input.Keyboard.GotKeyboardFocus 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 OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameter Type Description
e KeyboardFocusChangedEventArgs

The KeyboardFocusChangedEventArgs that contains the event data.

See Also

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.

See Also

OnKeyTipInvoked(KeyTipInvokedEventArgs)

Occurs when the control's key tip is invoked.

protected virtual void OnKeyTipInvoked(KeyTipInvokedEventArgs e)
Parameter Type Description
e KeyTipInvokedEventArgs

The event data.

See Also

OnKeyTipOpening(KeyTipOpeningEventArgs)

Occurs when the control's key tip is opening.

protected virtual void OnKeyTipOpening(KeyTipOpeningEventArgs e)
Parameter Type Description
e KeyTipOpeningEventArgs

The event data.

See Also

OnKeyUp(KeyEventArgs)

Invoked when an unhandled System.Windows.Input.Keyboard.KeyUp 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 OnKeyUp(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The KeyEventArgs that contains the event data.

See Also

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.

See Also

OnMouseLeave(MouseEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.

protected override void OnMouseLeave(MouseEventArgs e)
Parameter Type Description
e MouseEventArgs

The MouseEventArgs that contains the event data.

See Also

OnMouseLeftButtonDown(MouseButtonEventArgs)

Invoked when an unhandled MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event.

protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameter Type Description
e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed.

See Also

OnMouseLeftButtonUp(MouseButtonEventArgs)

Invoked when an unhandled MouseLeftButtonUp routed 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 OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameter Type Description
e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.

See Also

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.

See Also

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

See Also

Fields

HasHighlightProperty

Defines the HasHighlight property.

public static readonly DependencyProperty HasHighlightProperty

IsHighlightedProperty

Defines the IsHighlighted property.

public static readonly DependencyProperty IsHighlightedProperty

IsPressedProperty

Defines the IsPressed property.

public static readonly DependencyProperty IsPressedProperty

IsSelectedProperty

Defines the IsSelected property.

public static readonly DependencyProperty IsSelectedProperty

KeyTipTextProperty

Defines the KeyTipText property.

public static readonly DependencyProperty KeyTipTextProperty

LabelProperty

Defines the Label property.

public static readonly DependencyProperty LabelProperty

LayoutBehaviorProperty

Defines the LayoutBehavior property.

public static readonly DependencyProperty LayoutBehaviorProperty

ScreenTipFooterProperty

Defines the ScreenTipFooter property.

public static readonly DependencyProperty ScreenTipFooterProperty

ScreenTipHeaderProperty

Defines the ScreenTipHeader property.

public static readonly DependencyProperty ScreenTipHeaderProperty

UseAccentedBorderProperty

Defines the UseAccentedBorder property.

public static readonly DependencyProperty UseAccentedBorderProperty

UseMenuItemAppearanceProperty

Defines the UseMenuItemAppearance property.

public static readonly DependencyProperty UseMenuItemAppearanceProperty

Extension Methods

See Also