BarGalleryItem Class
Represents an item within a bar gallery control.
public class BarGalleryItem : ContentControl, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild
- Inheritance:
- System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control System.Windows.Controls.ContentControl Object
Constructors
BarGalleryItem()
Initializes a new instance of the BarGalleryItem class.
public BarGalleryItem()
Properties
HasHighlight
Gets whether the gallery item should be highlighted.
public bool HasHighlight { get; }
Property Value
- System.Boolean:
true
if the gallery item should be highlighted; otherwise,false
.
IsHighlighted
Gets or sets whether the gallery item is currently highlighted.
public bool IsHighlighted { get; set; }
Property Value
- System.Boolean:
true
if the gallery item is currently highlighted; otherwise,false
. The default value isfalse
.
IsPressed
Gets whether the gallery item is currently pressed.
public bool IsPressed { get; }
Property Value
- System.Boolean:
true
if the gallery item is currently pressed; otherwise,false
.
IsSelected
Gets or sets whether the gallery item is currently selected.
public bool IsSelected { get; set; }
Property Value
- System.Boolean:
true
if the gallery item is currently selected; otherwise,false
. The default value isfalse
.
KeyTipText
Gets or sets the key tip text used to access the control.
[Localizability(LocalizationCategory.Label)]
public string KeyTipText { get; set; }
Property Value
- System.String:
The key tip text used to access the control.
Label
Gets or sets the text label to display.
[Localizability(LocalizationCategory.Label)]
public string Label { get; set; }
Property Value
- System.String:
The text label to display.
LayoutBehavior
Gets or sets a BarGalleryItemLayoutBehavior indicating how the gallery item should be visually displayed.
public BarGalleryItemLayoutBehavior LayoutBehavior { get; set; }
Property Value
- BarGalleryItemLayoutBehavior:
A BarGalleryItemLayoutBehavior indicating how the gallery item should be visually displayed. The default value is Default.
ScreenTipFooter
Gets or sets the screen tip footer content.
public object ScreenTipFooter { get; set; }
Property Value
- System.Object:
The screen tip footer content.
ScreenTipHeader
Gets or sets the screen tip header content.
public object ScreenTipHeader { get; set; }
Property Value
- System.Object:
The screen tip header content.
UseAccentedBorder
Gets or sets whether to use an accented item border, common when they have vibrant content such as color swatches.
public bool UseAccentedBorder { get; set; }
Property Value
- System.Boolean:
true
if an accented item border should be used; otherwise,false
. The default value isfalse
.
UseMenuItemAppearance
Gets or sets whether to use a menu item appearance, common for single-column menu galleries.
public bool UseMenuItemAppearance { get; set; }
Property Value
- System.Boolean:
true
if a menu item appearance should be used; otherwise,false
. The default value isfalse
.
Methods
OnCreateAutomationPeer()
Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- System.Windows.Automation.Peers.AutomationPeer:
The type-specific System.Windows.Automation.Peers.AutomationPeer implementation.
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Invoked when an unhandled 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 | System.Windows.Input.KeyboardFocusChangedEventArgs | The System.Windows.Input.KeyboardFocusChangedEventArgs that contains the event data. |
OnKeyDown(KeyEventArgs)
Invoked when an unhandled 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 | System.Windows.Input.KeyEventArgs | The System.Windows.Input.KeyEventArgs that contains the event data. |
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. |
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. |
OnKeyUp(KeyEventArgs)
Invoked when an unhandled 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 | System.Windows.Input.KeyEventArgs | The System.Windows.Input.KeyEventArgs that contains the event data. |
OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)
Invoked when an unhandled 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 | System.Windows.Input.KeyboardFocusChangedEventArgs | The System.Windows.Input.KeyboardFocusChangedEventArgs that contains event data. |
OnMouseLeave(MouseEventArgs)
Invoked when an unhandled 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 | System.Windows.Input.MouseEventArgs | The System.Windows.Input.MouseEventArgs that contains the event data. |
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 | System.Windows.Input.MouseButtonEventArgs | The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed. |
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 | System.Windows.Input.MouseButtonEventArgs | The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released. |
OnMouseMove(MouseEventArgs)
Invoked when an unhandled 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 | System.Windows.Input.MouseEventArgs | The System.Windows.Input.MouseEventArgs that contains the event data. |
ToString()
Returns the string representation of a System.Windows.Controls.Control object.
public override string ToString()
Returns
- System.String:
A string that represents the control.
Fields
HasHighlightProperty
Identifies the HasHighlight dependency property. This field is read-only.
public static readonly DependencyProperty HasHighlightProperty
IsHighlightedProperty
Identifies the IsHighlighted dependency property. This field is read-only.
public static readonly DependencyProperty IsHighlightedProperty
IsPressedProperty
Identifies the IsPressed dependency property. This field is read-only.
public static readonly DependencyProperty IsPressedProperty
IsSelectedProperty
Identifies the IsSelected dependency property. This field is read-only.
public static readonly DependencyProperty IsSelectedProperty
KeyTipTextProperty
Identifies the KeyTipText dependency property. This field is read-only.
public static readonly DependencyProperty KeyTipTextProperty
LabelProperty
Identifies the Label dependency property. This field is read-only.
public static readonly DependencyProperty LabelProperty
LayoutBehaviorProperty
Identifies the LayoutBehavior dependency property. This field is read-only.
public static readonly DependencyProperty LayoutBehaviorProperty
ScreenTipFooterProperty
Identifies the ScreenTipFooter dependency property. This field is read-only.
public static readonly DependencyProperty ScreenTipFooterProperty
ScreenTipHeaderProperty
Identifies the ScreenTipHeader dependency property. This field is read-only.
public static readonly DependencyProperty ScreenTipHeaderProperty
UseAccentedBorderProperty
Identifies the UseAccentedBorder dependency property. This field is read-only.
public static readonly DependencyProperty UseAccentedBorderProperty
UseMenuItemAppearanceProperty
Identifies the UseMenuItemAppearance dependency property. This field is read-only.
public static readonly DependencyProperty UseMenuItemAppearanceProperty
Inherited Members
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()
Extension Methods
- FrameworkElementExtensions.AnimateDoubleProperty(String, Double, Double, Double, Nullable<Double>, Nullable<Double>)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, DependencyProperty, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.GetCurrentSize()