Represents a view model for a standard gallery control within a bar control.
- Inheritance:
-
object
Observable
Object BarBase Keyed BarObject View Model Base Gallery objectView Model Base
- Derived:
-
Bar
Combo Box View Model
- Implements:
-
IHas
Key IHasVariant Images
Constructors
BarGalleryViewModel()
Initializes a new instance of the class.
BarGalleryViewModel(string)
Initializes a new instance of the class with the specified key. The label and key tip text are auto-generated.
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
BarGalleryViewModel(string, IEnumerable)
Initializes a new instance of the class with the specified key and items. The label and key tip text are auto-generated.
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
items | IEnumerable | The collection of gallery items, where the items are typically of type IBar |
BarGalleryViewModel(string, string)
Initializes a new instance of the class with the specified key and label. The key tip text is auto-generated.
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
label | string | The text label to display, which is auto-generated from the |
BarGalleryViewModel(string, string, IEnumerable)
Initializes a new instance of the class with the specified key, label, and items. The key tip text is auto-generated.
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
label | string | The text label to display, which is auto-generated from the |
items | IEnumerable | The collection of gallery items, where the items are typically of type IBar |
BarGalleryViewModel(string, string, string)
Initializes a new instance of the class with the specified key, label, and key tip text.
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
label | string | The text label to display, which is auto-generated from the |
keyTipText | string | The key tip text, which is auto-generated from the |
BarGalleryViewModel(string, string, string, IEnumerable)
Initializes a new instance of the class with the specified key, label, key tip text, and items.
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
label | string | The text label to display, which is auto-generated from the |
keyTipText | string | The key tip text, which is auto-generated from the |
items | IEnumerable | The collection of gallery items, where the items are typically of type IBar |
BarGalleryViewModel(string, string, string, ICommand)
Initializes a new instance of the class with the specified key, label, key tip text, and command.
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
label | string | The text label to display, which is auto-generated from the |
keyTipText | string | The key tip text, which is auto-generated from the |
command | ICommand | The command to attach to the control. |
BarGalleryViewModel(string, string, string, ICommand, IEnumerable)
Initializes a new instance of the class with the specified key, label, key tip text, command, and items.
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
label | string | The text label to display, which is auto-generated from the |
keyTipText | string | The key tip text, which is auto-generated from the |
command | ICommand | The command to attach to the control. |
items | IEnumerable | The collection of gallery items, where the items are typically of type IBar |
BarGalleryViewModel(string, string, ICommand)
Initializes a new instance of the class with the specified key, label, and command. The key tip text is auto-generated.
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
label | string | The text label to display, which is auto-generated from the |
command | ICommand | The command to attach to the control. |
BarGalleryViewModel(string, string, ICommand, IEnumerable)
Initializes a new instance of the class with the specified key, label, command, and items. The key tip text is auto-generated.
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
label | string | The text label to display, which is auto-generated from the |
command | ICommand | The command to attach to the control. |
items | IEnumerable | The collection of gallery items, where the items are typically of type IBar |
BarGalleryViewModel(string, ICommand)
Initializes a new instance of the class with the specified key and command. The label and key tip text are auto-generated.
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
command | ICommand | The command to attach to the control. |
BarGalleryViewModel(string, ICommand, IEnumerable)
Initializes a new instance of the class with the specified key, command, and items. The label and key tip text are auto-generated.
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
command | ICommand | The command to attach to the control. |
items | IEnumerable | The collection of gallery items, where the items are typically of type IBar |
BarGalleryViewModel(RoutedCommand)
Initializes a new instance of the class with the specified Routed
Parameter | Type | Description |
---|---|---|
routedCommand | Routed |
The command to attach to the control. |
BarGalleryViewModel(RoutedCommand, IEnumerable)
Initializes a new instance of the class with the specified items and Routed
Parameter | Type | Description |
---|---|---|
routedCommand | Routed |
The command to attach to the control. |
items | IEnumerable | The collection of gallery items, where the items are typically of type IBar |
Properties
AboveMenuItems
Gets the collection of menu items that appear above the menu gallery in a popup.
Property Value
- Observable
Collection <object>: The collection of menu items that appear above the menu gallery in a popup.
BelowMenuItems
Gets the collection of menu items that below above the menu gallery in a popup.
Property Value
- Observable
Collection <object>: The collection of menu items that below above the menu gallery in a popup.
CanCategorize
Gets or sets whether the gallery sorts and displays items by category when an System.ComponentModel.ICollectionView is set to the ItemsSource
.
Property Value
- bool:
true
if the gallery sorts and displays items by category when an System.ComponentModel.ICollectionView is set to theItemsSource
; otherwise,false
. The default value istrue
.
CanFilter
Gets or sets whether the gallery supports filtering of items by category.
Property Value
- bool:
true
if the gallery supports filtering of items by category; otherwise,false
. The default value isfalse
.
CanRibbonAutoScrollToSelectedItem
Gets or sets whether to automatically scroll a ribbon gallery to the selected item on selection changes.
Property Value
- bool:
true
if the ribbon gallery selected item should automatically be scrolled into view on selection changes; otherwise,false
. The default value isfalse
.
CategoryHeaderTemplate
Gets or sets a Data
Property Value
- Data
Template : A Data
Template for category headers when categorization is enabled.
CollapsedButtonDescription
Gets or sets the text description to display in screen tips for the gallery when it is rendered as a collapsed button.
Property Value
- string:
The text description to display in screen tips for the gallery when it is rendered as a collapsed button.
HasCategoryHeaders
Gets or sets whether the gallery has category headers when categorizing.
Property Value
- bool:
true
if the gallery has category headers when categorizing; otherwise,false
. The default value istrue
.
IsSelectionSupported
Gets or sets whether selection is supported by the gallery.
Property Value
- bool:
true
if selection is supported by the gallery; otherwise,false
. The default value istrue
.
IsSynchronizedWithCurrentItem
Gets or sets whether the gallery control should keep its SelectedItem
property synchronized with the current item in its Items
property.
Property Value
- bool?:
true
if theSelectedItem
is always synchronized with the current item in theItems
;false
if theSelectedItem
is never synchronized with the current item;null
if theSelectedItem
is synchronized with the current item only if the gallery uses aCollectionView
. The default value isnull
.
Items
Gets or sets the collection of gallery items.
Property Value
- IEnumerable:
The collection of gallery items.
KeyTipText
Gets or sets the key tip text used to access the control.
Property Value
- string:
The key tip text used to access the control.
LargeImageSource
Gets or sets the Image32x32
size.
Property Value
- Image
Source : The Image
Source for a large image.
MaxMenuColumnCount
Gets or sets the maximum number of columns when in a menu.
MaxRibbonColumnCount
Gets or sets the maximum number of columns when in-ribbon.
Property Value
- int:
The maximum number of columns when in-ribbon. The default value is
15
.
MediumImageSource
Gets or sets the Image24x24
size.
Property Value
- Image
Source : The Image
Source for a medium image.
MenuResizeMode
Gets or sets a Control
Property Value
- Control
Resize :Mode A Control
Resize that indicates how the popup menu can resize. The default value is None.Mode
MinLargeRibbonColumnCount
Gets or sets the minimum number of columns to use when in-ribbon with a Large variant size.
Property Value
MinMediumRibbonColumnCount
Gets or sets the minimum number of columns to use when in-ribbon with a Medium variant size.
Property Value
MinMenuColumnCount
Gets or sets the minimum number of columns when in a menu.
Property Value
- int:
The minimum number of columns when in a menu. The default value is
1
.
PopupOpeningCommand
Gets or sets the ICommand that executes before the gallery's popup is opened, allowing its items to be customized in MVVM scenarios.
Property Value
SelectedFilterCategory
Gets or sets the selected filter category.
Property Value
- string:
The selected filter category.
SelectedItem
Gets or sets the selected item.
Property Value
- IBar
Gallery :Item View Model The selected item.
ToolBarItemCollapseBehavior
Gets or sets the Item
Property Value
- Item
Collapse :Behavior The Item
Collapse for the control when in a ribbon using Simplified layout mode. The default value isBehavior Default
.
ToolBarItemVariantBehavior
Gets or sets the Item
Property Value
- Item
Variant :Behavior The Item
Variant for the control when in a toolbar, which also applies when in a ribbon using Simplified layout mode. The default value isBehavior AlwaysSmall
.
UseAccentedItemBorder
Gets or sets whether to use an accented item border for gallery items, common when they have vibrant content such as color swatches.
Property Value
- bool:
true
if an accented item border should be used for gallery items; otherwise,false
. The default value isfalse
.
UseMenuItemAppearance
Gets or sets whether to use a menu item appearance for gallery items, common for single-column menu galleries.
Property Value
- bool:
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.
Property Value
- bool:
true
if gallery items should be indented past the menu's icon column; otherwise,false
. The default value isfalse
.
Methods
CreateCollectionViewSource(IEnumerable<IBarGalleryItemViewModel>, bool)
Creates a Collection
Parameter | Type | Description |
---|---|---|
items | IEnumerable<IBar |
The collection of gallery item view models to include in the collection view. |
categorize | bool | Whether the collection view source should support categorization by including a group description based on Category property values. |
Returns
- Collection
View :Source The Collection
View of gallery item view models that was created.Source
SelectItemByValueMatch<T>(Func<T, bool>)
Selects an item in the gallery that matches the predicate.
- Type Parameters:
-
T
-The type of IBar
Gallery to examine.Item View Model
Parameter | Type | Description |
---|---|---|
predicate | Func<T, bool> | A predicate that determines when an item matches criteria. |
Returns
- T:
The Bar
Gallery that was selected.View Model Base
Inherited Members
-
Bar
Gallery View Model Base. Are Surrounding Separators Allowed -
Bar
Gallery View Model Base. Can Clone To Ribbon Quick Access Tool Bar -
Bar
Gallery View Model Base. Command -
Bar
Gallery View Model Base. Is Visible -
Bar
Gallery View Model Base. Item Container Style -
Bar
Gallery View Model Base. Item Container Style Selector -
Bar
Gallery View Model Base. Item Spacing -
Bar
Gallery View Model Base. Item Template -
Bar
Gallery View Model Base. Item Template Selector -
Bar
Gallery View Model Base. Label -
Bar
Gallery View Model Base. Min Item Height -
Bar
Gallery View Model Base. Min Item Width -
Bar
Gallery View Model Base. Small Image Source -
Bar
Gallery View Model Base. Title -
Bar
Keyed Object View Model Base. To String() -
Bar
Keyed Object View Model Base. Key -
Observable
Object Base. Notify Property Changed(string) -
Observable
Object Base. On Property Changed(Property Changed Event Args) - ObservableObjectBase.SetProperty<T>(ref T, T, string)
-
Observable
Object Base. Property Changed -
object.
Get Type() -
object.
Memberwise Clone() -
object.
Equals(object) -
object.
Equals(object, object) -
object.
Reference Equals(object, object) -
object.
Get Hash Code()