BarMenuGallery Class
Represents a gallery control, for use within a menu.
[TemplatePart(Name = "PART_FilterButton", Type = typeof(BarMenuGalleryFilterButton))]
[TemplatePart(Name = "PART_ResizablePanel", Type = typeof(BarMenuGalleryResizablePanel))]
public class BarMenuGallery : BarGalleryBase, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IGeneratorHost, IContainItemStorage, ICommandSource, ISupportsCoerceLabel, IDragResizableControl
- 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.ItemsControl System.Windows.Controls.Primitives.Selector BarGalleryBase Object
- Derived:
- BarSizeSelectionMenuGallery
- Implements:
- IDragResizableControl
Constructors
BarMenuGallery()
Initializes a new instance of the BarMenuGallery class.
public BarMenuGallery()
Properties
AreSurroundingSeparatorsAllowed
Gets or sets whether the menu gallery can render surrounding separators.
public bool AreSurroundingSeparatorsAllowed { get; set; }
Property Value
- System.Boolean:
true
if the menu gallery can render surrounding separators; otherwise,false
. The default value istrue
.
CanCategorize
Gets or sets whether the gallery sorts and displays items by category when an ICollectionView is set to the ItemsSource
.
public bool CanCategorize { get; set; }
Property Value
- System.Boolean:
true
if the gallery sorts and displays items by category when an ICollectionView is set to theItemsSource
; otherwise,false
. The default value istrue
.
CanFilter
Gets or sets whether the gallery supports filtering of items by category.
public bool CanFilter { get; set; }
Property Value
- System.Boolean:
true
if the gallery supports filtering of items by category; otherwise,false
. The default value isfalse
.
CategoryContainerStyle
Gets or sets the System.Windows.Style that targets GroupItem, used to represent categories.
public Style CategoryContainerStyle { get; set; }
Property Value
- System.Windows.Style:
The System.Windows.Style that targets GroupItem, used to represent categories.
CategoryHeaderTemplate
Gets or sets the System.Windows.DataTemplate to display the category header.
public DataTemplate CategoryHeaderTemplate { get; set; }
Property Value
- System.Windows.DataTemplate:
The System.Windows.DataTemplate to display the category header.
HasCategoryHeaders
Gets or sets whether the gallery has category headers when categorizing.
public bool HasCategoryHeaders { get; set; }
Property Value
- System.Boolean:
true
if the gallery has category headers when categorizing; otherwise,false
. The default value istrue
.
IsFilterButtonVisible
Gets whether the filter button is visible.
public bool IsFilterButtonVisible { get; }
Property Value
- System.Boolean:
true
if the filter button is visible; otherwise,false
.
MaxColumnCount
Gets or sets the maximum number of columns.
public int MaxColumnCount { get; set; }
Property Value
- System.Int32:
The maximum number of columns. The default value is MaxValue.
MinColumnCount
Gets or sets the minimum number of columns.
public int MinColumnCount { get; set; }
Property Value
- System.Int32:
The minimum number of columns. The default value is
1
.
ResizeMode
Gets or sets a ControlResizeMode that indicates how the menu that contains the gallery can resize.
public ControlResizeMode ResizeMode { get; set; }
Property Value
- ControlResizeMode:
A ControlResizeMode that indicates how the menu that contains the gallery can resize. The default value is None.
SelectedFilterCategory
Gets or sets the selected filter category name.
[Localizability(LocalizationCategory.Title)]
public string SelectedFilterCategory { get; set; }
Property Value
- System.String:
The selected filter category name.
SelectFilterCategoryCommand
Provides an System.Windows.Input.ICommand used to select the filter category specified in the command parameter.
public ICommand SelectFilterCategoryCommand { get; }
Property Value
- System.Windows.Input.ICommand:
An System.Windows.Input.ICommand used to select the filter category specified in the command parameter.
UseMenuItemAppearance
Gets or sets whether to use a menu item appearance for gallery items, common for single-column menu galleries.
public bool UseMenuItemAppearance { get; set; }
Property Value
- System.Boolean:
true
if gallery items should use a menu item appearance; otherwise,false
. The default value isfalse
.
UseMenuItemIndent
Gets or sets whether to align gallery items in a menu so that they indent past the menu's icon column.
public bool UseMenuItemIndent { get; set; }
Property Value
- System.Boolean:
true
if gallery items should be indented past the menu's icon column; otherwise,false
. The default value isfalse
.
Methods
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
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.
OnItemsSourceChanged(IEnumerable, IEnumerable)
Called when the source of an item in a selector changes.
protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
Parameter | Type | Description |
---|---|---|
oldValue | System.Collections.IEnumerable | Old value of the source. |
newValue | System.Collections.IEnumerable | New value of the source. |
PrepareContainerForItemOverride(DependencyObject, Object)
Prepares the specified element to display the specified item.
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameter | Type | Description |
---|---|---|
element | System.Windows.DependencyObject | The element that is used to display the specified item. |
item | System.Object | The specified item to display. |
Explicit Interface Implementations
IDragResizableControl.ApplyDragResizeDelta(Double, Double)
Applies a horizontal/vertical delta from a drag-resize operation.
void IDragResizableControl.ApplyDragResizeDelta(double horizontalDelta, double verticalDelta)
Parameter | Type | Description |
---|---|---|
horizontalDelta | System.Double | The horizontal delta. |
verticalDelta | System.Double | The vertical delta. |
Fields
AreSurroundingSeparatorsAllowedProperty
Identifies the AreSurroundingSeparatorsAllowed dependency property. This field is read-only.
public static readonly DependencyProperty AreSurroundingSeparatorsAllowedProperty
CanCategorizeProperty
Identifies the CanCategorize dependency property. This field is read-only.
public static readonly DependencyProperty CanCategorizeProperty
CanFilterProperty
Identifies the CanFilter dependency property. This field is read-only.
public static readonly DependencyProperty CanFilterProperty
CategoryContainerStyleProperty
Identifies the CategoryContainerStyle dependency property. This field is read-only.
public static readonly DependencyProperty CategoryContainerStyleProperty
CategoryHeaderTemplateProperty
Identifies the CategoryHeaderTemplate dependency property. This field is read-only.
public static readonly DependencyProperty CategoryHeaderTemplateProperty
HasCategoryHeadersProperty
Identifies the HasCategoryHeaders dependency property. This field is read-only.
public static readonly DependencyProperty HasCategoryHeadersProperty
IsFilterButtonVisibleProperty
Identifies the IsFilterButtonVisible dependency property. This field is read-only.
public static readonly DependencyProperty IsFilterButtonVisibleProperty
MaxColumnCountProperty
Identifies the MaxColumnCount dependency property. This field is read-only.
public static readonly DependencyProperty MaxColumnCountProperty
MinColumnCountProperty
Identifies the MinColumnCount dependency property. This field is read-only.
public static readonly DependencyProperty MinColumnCountProperty
ResizeModeProperty
Identifies the ResizeMode dependency property. This field is read-only.
public static readonly DependencyProperty ResizeModeProperty
SelectedFilterCategoryProperty
Identifies the SelectedFilterCategory dependency property. This field is read-only.
public static readonly DependencyProperty SelectedFilterCategoryProperty
UseMenuItemAppearanceProperty
Identifies the UseMenuItemAppearance dependency property. This field is read-only.
public static readonly DependencyProperty UseMenuItemAppearanceProperty
UseMenuItemIndentProperty
Identifies the UseMenuItemIndent dependency property. This field is read-only.
public static readonly DependencyProperty UseMenuItemIndentProperty
Inherited Members
- BarGalleryBase.HighlightedItemChangedEvent
- BarGalleryBase.BetweenPreviewDelayProperty
- BarGalleryBase.CanCloneToRibbonQuickAccessToolBarProperty
- BarGalleryBase.CommandProperty
- BarGalleryBase.CommandTargetProperty
- BarGalleryBase.HighlightedItemProperty
- BarGalleryBase.InitialPreviewDelayProperty
- BarGalleryBase.IsSelectionSupportedProperty
- BarGalleryBase.ItemSpacingProperty
- BarGalleryBase.KeyProperty
- BarGalleryBase.LabelProperty
- BarGalleryBase.LargeImageSourceProperty
- BarGalleryBase.MinItemHeightProperty
- BarGalleryBase.MinItemWidthProperty
- BarGalleryBase.MediumImageSourceProperty
- BarGalleryBase.PreviewedItemProperty
- BarGalleryBase.SmallImageSourceProperty
- BarGalleryBase.TitleProperty
- BarGalleryBase.UseAccentedItemBorderProperty
- BarGalleryBase.UserInterfaceDensityProperty
- BarGalleryBase.ClearContainerForItemOverride(DependencyObject, Object)
- BarGalleryBase.GetContainerForItemOverride()
- BarGalleryBase.IsItemItsOwnContainerOverride(Object)
- BarGalleryBase.OnHighlightedItemChanged(RoutedEventArgs)
- BarGalleryBase.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- BarGalleryBase.OnItemSpacingPropertyValueChanged(DependencyPropertyChangedEventArgs)
- BarGalleryBase.OnMinItemHeightPropertyValueChanged(DependencyPropertyChangedEventArgs)
- BarGalleryBase.OnMinItemWidthPropertyValueChanged(DependencyPropertyChangedEventArgs)
- BarGalleryBase.OnMouseLeave(MouseEventArgs)
- BarGalleryBase.OnMouseMove(MouseEventArgs)
- BarGalleryBase.OnSelectionChanged(SelectionChangedEventArgs)
- BarGalleryBase.OnUserInterfaceDensityPropertyValueChanged(DependencyPropertyChangedEventArgs)
- BarGalleryBase.ScrollToSelectedItem(Boolean)
- BarGalleryBase.ToString()
- BarGalleryBase.BetweenPreviewDelay
- BarGalleryBase.CanCloneToRibbonQuickAccessToolBar
- BarGalleryBase.CanStopPreviewingOnMouseLeave
- BarGalleryBase.Command
- BarGalleryBase.CommandTarget
- BarGalleryBase.HighlightedItem
- BarGalleryBase.InitialPreviewDelay
- BarGalleryBase.IsSelectionSupported
- BarGalleryBase.ItemSpacing
- BarGalleryBase.Key
- BarGalleryBase.Label
- BarGalleryBase.LargeImageSource
- BarGalleryBase.MediumImageSource
- BarGalleryBase.MinItemHeight
- BarGalleryBase.MinItemWidth
- BarGalleryBase.PreviewedItem
- BarGalleryBase.SmallImageSource
- BarGalleryBase.Title
- BarGalleryBase.UseAccentedItemBorder
- BarGalleryBase.UserInterfaceDensity
- BarGalleryBase.HighlightedItemChanged
- 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()