In This Article

BarGalleryItem Class

Represents an item within a bar gallery control.

[PseudoClasses(new string[] { ":highlighted" })]
[PseudoClasses(new string[] { ":label-visible" })]
[PseudoClasses(new string[] { ":pressed" })]
[PseudoClasses(new string[] { ":selected" })]
public class BarGalleryItem : ContentControl, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
Inheritance:
object AvaloniaObject Animatable StyledElement Visual Layoutable Interactive InputElement Control TemplatedControl ContentControl object
Implements:
IDataContextProvider ILogical IThemeVariantHost IResourceHost IResourceNode IStyleHost ISetLogicalParent ISetInheritanceParent IStyleable INamed IInputElement IDataTemplateHost ISetterValue

Constructors

BarGalleryItem()

Initializes an instance of the class.

public BarGalleryItem()

See Also

Properties

HasHighlight

Whether the gallery item should be highlighted.

public bool HasHighlight { get; }

Property Value

bool:

The default value is false.

See Also

IsHighlighted

Whether the gallery item is currently highlighted.

public bool IsHighlighted { get; set; }

Property Value

bool:

The default value is false.

See Also

IsPressed

Whether the gallery item is currently pressed.

public bool IsPressed { get; }

Property Value

bool

See Also

IsSelected

Whether the gallery item is currently selected.

public bool IsSelected { get; set; }

Property Value

bool:

The default value is false.

See Also

KeyTipText

The key tip text used to access the control.

public string? KeyTipText { get; set; }

Property Value

string

See Also

Label

The text label to display.

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

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:

The default value is false.

See Also

UseMenuItemAppearance

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

public bool UseMenuItemAppearance { get; set; }

Property Value

bool:

The default value is false.

See Also

Methods

OnCreateAutomationPeer()

Returns a new, type-specific Avalonia.Automation.Peers.AutomationPeer implementation for the control.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific Avalonia.Automation.Peers.AutomationPeer implementation.

See Also

OnGotFocus(GotFocusEventArgs)

Called before the Avalonia.Input.InputElement.GotFocus event occurs.

protected override void OnGotFocus(GotFocusEventArgs e)
Parameter Type Description
e GotFocusEventArgs

The event args.

See Also

OnKeyDown(KeyEventArgs)

Called before the Avalonia.Input.InputElement.KeyDown event occurs.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The event args.

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 KeyTipInvokedEventArgs containing data related to this event.

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 KeyTipOpeningEventArgs containing data related to this event.

See Also

OnKeyUp(KeyEventArgs)

Called before the Avalonia.Input.InputElement.KeyUp event occurs.

protected override void OnKeyUp(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The event args.

See Also

OnLostFocus(RoutedEventArgs)

Called before the Avalonia.Input.InputElement.LostFocus event occurs.

protected override void OnLostFocus(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

The event args.

See Also

OnPointerCaptureLost(PointerCaptureLostEventArgs)

Called before the Avalonia.Input.InputElement.PointerCaptureLost event occurs.

protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)
Parameter Type Description
e PointerCaptureLostEventArgs

The event args.

See Also

OnPointerExited(PointerEventArgs)

Called before the Avalonia.Input.InputElement.PointerExited event occurs.

protected override void OnPointerExited(PointerEventArgs e)
Parameter Type Description
e PointerEventArgs

The event args.

See Also

OnPointerMoved(PointerEventArgs)

Called before the Avalonia.Input.InputElement.PointerMoved event occurs.

protected override void OnPointerMoved(PointerEventArgs e)
Parameter Type Description
e PointerEventArgs

The event args.

See Also

OnPointerPressed(PointerPressedEventArgs)

Called before the Avalonia.Input.InputElement.PointerPressed event occurs.

protected override void OnPointerPressed(PointerPressedEventArgs e)
Parameter Type Description
e PointerPressedEventArgs

The event args.

See Also

OnPointerReleased(PointerReleasedEventArgs)

Called before the Avalonia.Input.InputElement.PointerReleased event occurs.

protected override void OnPointerReleased(PointerReleasedEventArgs e)
Parameter Type Description
e PointerReleasedEventArgs

The event args.

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 StyledProperty<bool> HasHighlightProperty

IsHighlightedProperty

Defines the IsHighlighted property.

public static readonly StyledProperty<bool> IsHighlightedProperty

IsPressedProperty

Defines the IsPressed property.

public static readonly StyledProperty<bool> IsPressedProperty

IsSelectedProperty

Defines the IsSelected property.

public static readonly StyledProperty<bool> IsSelectedProperty

KeyTipTextProperty

Defines the KeyTipText property.

public static readonly StyledProperty<string?> KeyTipTextProperty

LabelProperty

Defines the Label property.

public static readonly StyledProperty<string?> LabelProperty

LayoutBehaviorProperty

Defines the LayoutBehavior property.

public static readonly StyledProperty<BarGalleryItemLayoutBehavior> LayoutBehaviorProperty

ScreenTipFooterProperty

Defines the ScreenTipFooter property.

public static readonly StyledProperty<object?> ScreenTipFooterProperty

ScreenTipHeaderProperty

Defines the ScreenTipHeader property.

public static readonly StyledProperty<object?> ScreenTipHeaderProperty

UseAccentedBorderProperty

Defines the UseAccentedBorder property.

public static readonly StyledProperty<bool> UseAccentedBorderProperty

UseMenuItemAppearanceProperty

Defines the UseMenuItemAppearance property.

public static readonly StyledProperty<bool> UseMenuItemAppearanceProperty

Inherited Members

  • ContentControl.ContentProperty
  • ContentControl.ContentTemplateProperty
  • ContentControl.HorizontalContentAlignmentProperty
  • ContentControl.VerticalContentAlignmentProperty
  • ContentControl.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
  • ContentControl.RegisterContentPresenter(ContentPresenter)
  • ContentControl.Content
  • ContentControl.ContentTemplate
  • ContentControl.Presenter
  • ContentControl.HorizontalContentAlignment
  • ContentControl.VerticalContentAlignment
  • TemplatedControl.BackgroundProperty
  • TemplatedControl.BackgroundSizingProperty
  • TemplatedControl.BorderBrushProperty
  • TemplatedControl.BorderThicknessProperty
  • TemplatedControl.CornerRadiusProperty
  • TemplatedControl.FontFamilyProperty
  • TemplatedControl.FontFeaturesProperty
  • TemplatedControl.FontSizeProperty
  • TemplatedControl.FontStyleProperty
  • TemplatedControl.FontWeightProperty
  • TemplatedControl.FontStretchProperty
  • TemplatedControl.ForegroundProperty
  • TemplatedControl.PaddingProperty
  • TemplatedControl.TemplateProperty
  • TemplatedControl.IsTemplateFocusTargetProperty
  • TemplatedControl.TemplateAppliedEvent
  • TemplatedControl.GetIsTemplateFocusTarget(Control)
  • TemplatedControl.SetIsTemplateFocusTarget(Control, bool)
  • TemplatedControl.ApplyTemplate()
  • TemplatedControl.GetTemplateFocusTarget()
  • TemplatedControl.OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)
  • TemplatedControl.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)
  • TemplatedControl.OnApplyTemplate(TemplateAppliedEventArgs)
  • TemplatedControl.OnTemplateChanged(AvaloniaPropertyChangedEventArgs)
  • TemplatedControl.Background
  • TemplatedControl.BackgroundSizing
  • TemplatedControl.BorderBrush
  • TemplatedControl.BorderThickness
  • TemplatedControl.CornerRadius
  • TemplatedControl.FontFamily
  • TemplatedControl.FontFeatures
  • TemplatedControl.FontSize
  • TemplatedControl.FontStyle
  • TemplatedControl.FontWeight
  • TemplatedControl.FontStretch
  • TemplatedControl.Foreground
  • TemplatedControl.Padding
  • TemplatedControl.Template
  • TemplatedControl.TemplateApplied
  • Control.FocusAdornerProperty
  • Control.TagProperty
  • Control.ContextMenuProperty
  • Control.ContextFlyoutProperty
  • Control.RequestBringIntoViewEvent
  • Control.ContextRequestedEvent
  • Control.LoadedEvent
  • Control.UnloadedEvent
  • Control.SizeChangedEvent
  • Control.OnLoaded(RoutedEventArgs)
  • Control.OnUnloaded(RoutedEventArgs)
  • Control.OnSizeChanged(SizeChangedEventArgs)
  • Control.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
  • Control.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
  • Control.FocusAdorner
  • Control.DataTemplates
  • Control.ContextMenu
  • Control.ContextFlyout
  • Control.IsLoaded
  • Control.Tag
  • Control.ContextRequested
  • Control.Loaded
  • Control.Unloaded
  • Control.SizeChanged
  • InputElement.FocusableProperty
  • InputElement.IsEnabledProperty
  • InputElement.IsEffectivelyEnabledProperty
  • InputElement.CursorProperty
  • InputElement.IsKeyboardFocusWithinProperty
  • InputElement.IsFocusedProperty
  • InputElement.IsHitTestVisibleProperty
  • InputElement.IsPointerOverProperty
  • InputElement.IsTabStopProperty
  • InputElement.GotFocusEvent
  • InputElement.LostFocusEvent
  • InputElement.KeyDownEvent
  • InputElement.KeyUpEvent
  • InputElement.TabIndexProperty
  • InputElement.TextInputEvent
  • InputElement.TextInputMethodClientRequestedEvent
  • InputElement.PointerEnteredEvent
  • InputElement.PointerExitedEvent
  • InputElement.PointerMovedEvent
  • InputElement.PointerPressedEvent
  • InputElement.PointerReleasedEvent
  • InputElement.PointerCaptureLostEvent
  • InputElement.PointerWheelChangedEvent
  • InputElement.TappedEvent
  • InputElement.HoldingEvent
  • InputElement.DoubleTappedEvent
  • InputElement.Focus(NavigationMethod, KeyModifiers)
  • InputElement.OnTextInput(TextInputEventArgs)
  • InputElement.OnPointerEntered(PointerEventArgs)
  • InputElement.OnPointerWheelChanged(PointerWheelEventArgs)
  • InputElement.UpdateIsEffectivelyEnabled()
  • InputElement.Focusable
  • InputElement.IsEnabled
  • InputElement.Cursor
  • InputElement.IsKeyboardFocusWithin
  • InputElement.IsFocused
  • InputElement.IsHitTestVisible
  • InputElement.IsPointerOver
  • InputElement.IsTabStop
  • InputElement.IsEffectivelyEnabled
  • InputElement.TabIndex
  • InputElement.KeyBindings
  • InputElement.IsEnabledCore
  • InputElement.GestureRecognizers
  • InputElement.GotFocus
  • InputElement.LostFocus
  • InputElement.KeyDown
  • InputElement.KeyUp
  • InputElement.TextInput
  • InputElement.TextInputMethodClientRequested
  • InputElement.PointerEntered
  • InputElement.PointerExited
  • InputElement.PointerMoved
  • InputElement.PointerPressed
  • InputElement.PointerReleased
  • InputElement.PointerCaptureLost
  • InputElement.PointerWheelChanged
  • InputElement.Tapped
  • InputElement.Holding
  • InputElement.DoubleTapped
  • Interactive.AddHandler(RoutedEvent, Delegate, RoutingStrategies, bool)
  • Interactive.AddHandler<TEventArgs>(RoutedEvent<TEventArgs>, EventHandler<TEventArgs>, RoutingStrategies, bool)
  • Interactive.RemoveHandler(RoutedEvent, Delegate)
  • Interactive.RemoveHandler<TEventArgs>(RoutedEvent<TEventArgs>, EventHandler<TEventArgs>)
  • Interactive.RaiseEvent(RoutedEventArgs)
  • Interactive.BuildEventRoute(RoutedEvent)
  • Layoutable.DesiredSizeProperty
  • Layoutable.WidthProperty
  • Layoutable.HeightProperty
  • Layoutable.MinWidthProperty
  • Layoutable.MaxWidthProperty
  • Layoutable.MinHeightProperty
  • Layoutable.MaxHeightProperty
  • Layoutable.MarginProperty
  • Layoutable.HorizontalAlignmentProperty
  • Layoutable.VerticalAlignmentProperty
  • Layoutable.UseLayoutRoundingProperty
  • Layoutable.UpdateLayout()
  • Layoutable.Measure(Size)
  • Layoutable.Arrange(Rect)
  • Layoutable.InvalidateMeasure()
  • Layoutable.InvalidateArrange()
  • Layoutable.AffectsMeasure<T>(params AvaloniaProperty[])
  • Layoutable.AffectsArrange<T>(params AvaloniaProperty[])
  • Layoutable.MeasureCore(Size)
  • Layoutable.MeasureOverride(Size)
  • Layoutable.ArrangeCore(Rect)
  • Layoutable.ArrangeOverride(Size)
  • Layoutable.OnMeasureInvalidated()
  • Layoutable.OnVisualParentChanged(Visual, Visual)
  • Layoutable.Width
  • Layoutable.Height
  • Layoutable.MinWidth
  • Layoutable.MaxWidth
  • Layoutable.MinHeight
  • Layoutable.MaxHeight
  • Layoutable.Margin
  • Layoutable.HorizontalAlignment
  • Layoutable.VerticalAlignment
  • Layoutable.DesiredSize
  • Layoutable.IsMeasureValid
  • Layoutable.IsArrangeValid
  • Layoutable.UseLayoutRounding
  • Layoutable.EffectiveViewportChanged
  • Layoutable.LayoutUpdated
  • Visual.BoundsProperty
  • Visual.ClipToBoundsProperty
  • Visual.ClipProperty
  • Visual.IsVisibleProperty
  • Visual.OpacityProperty
  • Visual.OpacityMaskProperty
  • Visual.EffectProperty
  • Visual.HasMirrorTransformProperty
  • Visual.RenderTransformProperty
  • Visual.RenderTransformOriginProperty
  • Visual.FlowDirectionProperty
  • Visual.VisualParentProperty
  • Visual.ZIndexProperty
  • Visual.GetFlowDirection(Visual)
  • Visual.SetFlowDirection(Visual, FlowDirection)
  • Visual.InvalidateVisual()
  • Visual.Render(DrawingContext)
  • Visual.AffectsRender<T>(params AvaloniaProperty[])
  • Visual.LogicalChildrenCollectionChanged(object, NotifyCollectionChangedEventArgs)
  • Visual.OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
  • Visual.OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)
  • Visual.InvalidateMirrorTransform()
  • Visual.Bounds
  • Visual.ClipToBounds
  • Visual.Clip
  • Visual.IsEffectivelyVisible
  • Visual.IsVisible
  • Visual.Opacity
  • Visual.OpacityMask
  • Visual.Effect
  • Visual.HasMirrorTransform
  • Visual.RenderTransform
  • Visual.RenderTransformOrigin
  • Visual.FlowDirection
  • Visual.ZIndex
  • Visual.VisualChildren
  • Visual.VisualRoot
  • Visual.BypassFlowDirectionPolicies
  • Visual.AttachedToVisualTree
  • Visual.DetachedFromVisualTree
  • StyledElement.DataContextProperty
  • StyledElement.NameProperty
  • StyledElement.ParentProperty
  • StyledElement.TemplatedParentProperty
  • StyledElement.ThemeProperty
  • StyledElement.BeginInit()
  • StyledElement.EndInit()
  • StyledElement.ApplyStyling()
  • StyledElement.InitializeIfNeeded()
  • StyledElement.TryGetResource(object, ThemeVariant, out object)
  • StyledElement.OnDataContextChanged(EventArgs)
  • StyledElement.OnDataContextBeginUpdate()
  • StyledElement.OnDataContextEndUpdate()
  • StyledElement.OnInitialized()
  • StyledElement.Name
  • StyledElement.Classes
  • StyledElement.DataContext
  • StyledElement.IsInitialized
  • StyledElement.Styles
  • StyledElement.StyleKey
  • StyledElement.Resources
  • StyledElement.TemplatedParent
  • StyledElement.Theme
  • StyledElement.LogicalChildren
  • StyledElement.PseudoClasses
  • StyledElement.StyleKeyOverride
  • StyledElement.Parent
  • StyledElement.ActualThemeVariant
  • StyledElement.AttachedToLogicalTree
  • StyledElement.DetachedFromLogicalTree
  • StyledElement.DataContextChanged
  • StyledElement.Initialized
  • StyledElement.ResourcesChanged
  • StyledElement.ActualThemeVariantChanged
  • Animatable.TransitionsProperty
  • Animatable.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)
  • Animatable.Transitions
  • AvaloniaObject.CheckAccess()
  • AvaloniaObject.VerifyAccess()
  • AvaloniaObject.ClearValue(AvaloniaProperty)
  • AvaloniaObject.ClearValue<T>(AvaloniaProperty<T>)
  • AvaloniaObject.ClearValue<T>(StyledProperty<T>)
  • AvaloniaObject.ClearValue<T>(DirectPropertyBase<T>)
  • AvaloniaObject.Equals(object)
  • AvaloniaObject.GetHashCode()
  • AvaloniaObject.GetValue(AvaloniaProperty)
  • AvaloniaObject.GetValue<T>(StyledProperty<T>)
  • AvaloniaObject.GetValue<T>(DirectPropertyBase<T>)
  • AvaloniaObject.GetBaseValue<T>(StyledProperty<T>)
  • AvaloniaObject.IsAnimating(AvaloniaProperty)
  • AvaloniaObject.IsSet(AvaloniaProperty)
  • AvaloniaObject.SetValue(AvaloniaProperty, object, BindingPriority)
  • AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)
  • AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)
  • AvaloniaObject.SetCurrentValue(AvaloniaProperty, object)
  • AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)
  • AvaloniaObject.Bind(AvaloniaProperty, IBinding)
  • AvaloniaObject.Bind(AvaloniaProperty, IObservable<object>, BindingPriority)
  • AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<object>, BindingPriority)
  • AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<T>, BindingPriority)
  • AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<BindingValue<T>>, BindingPriority)
  • AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<object>)
  • AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<T>)
  • AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<BindingValue<T>>)
  • AvaloniaObject.CoerceValue(AvaloniaProperty)
  • AvaloniaObject.UpdateDataValidation(AvaloniaProperty, BindingValueType, Exception)
  • AvaloniaObject.RaisePropertyChanged<T>(DirectPropertyBase<T>, T, T)
  • AvaloniaObject.SetAndRaise<T>(DirectPropertyBase<T>, ref T, T)
  • AvaloniaObject.InheritanceParent
  • AvaloniaObject.this[AvaloniaProperty]
  • AvaloniaObject.this[IndexerDescriptor]
  • AvaloniaObject.PropertyChanged
  • object.GetType()
  • object.MemberwiseClone()
  • object.Equals(object, object)
  • object.ReferenceEquals(object, object)

Extension Methods

See Also