In This Article

BarGalleryViewModelBase Class

Represents an abstract view model base for a gallery control within a bar control.

public abstract class BarGalleryViewModelBase : BarKeyedObjectViewModelBase, IHasKey, IHasTag
Inheritance:
object ObservableObjectBase BarKeyedObjectViewModelBase object
Derived:
BarGalleryViewModel BarSizeSelectionMenuGalleryViewModel
Implements:
IHasKey IHasTag

Constructors

BarGalleryViewModelBase()

Initializes an instance of the class.

protected BarGalleryViewModelBase()

BarGalleryViewModelBase(string?)

Initializes an instance of the class with the specified key. The label and key tip text are auto-generated.

protected BarGalleryViewModelBase(string? key)
Parameter Type Description
key string

A string that uniquely identifies the control.

BarGalleryViewModelBase(string?, string?, ICommand?)

Initializes an instance of the class with the specified key, label, and command. The key tip text is auto-generated.

protected BarGalleryViewModelBase(string? key, string? label, ICommand? 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 command or key if null.

command ICommand

The command to attach to the control.

Properties

AreSurroundingSeparatorsAllowed

Indicates whether the menu gallery can render surrounding separators.

public bool AreSurroundingSeparatorsAllowed { get; set; }

Property Value

bool:

true if the menu gallery can render surrounding separators; otherwise, false. The default value is true.

CanCloneToRibbonQuickAccessToolBar

Indicates whether the control can be cloned to the ribbon quick-access toolbar.

public bool CanCloneToRibbonQuickAccessToolBar { get; set; }

Property Value

bool:

true if the control can be cloned to the ribbon quick-access toolbar; otherwise, false. The default value is true.

Command

The ICommand to attach to the control.

public ICommand? Command { get; set; }

Property Value

ICommand

IsVisible

Indicates whether the control is currently visible.

public bool IsVisible { get; set; }

Property Value

bool:

The default value is true.

ItemContainerStyle

The Style to apply to gallery item container elements.

public Style? ItemContainerStyle { get; set; }

Property Value

Style

ItemContainerStyleSelector

The StyleSelector that picks a Style to apply to gallery item container elements.

public StyleSelector? ItemContainerStyleSelector { get; set; }

Property Value

StyleSelector

ItemSpacing

The amount of spacing between gallery items.

public double ItemSpacing { get; set; }

Property Value

double:

The default value is 0.0.

ItemTemplate

The DataTemplate used to display the content for each gallery item.

public DataTemplate? ItemTemplate { get; set; }

Property Value

DataTemplate

ItemTemplateSelector

The DataTemplateSelector that picks a DataTemplate used to display the content for each gallery item.

public DataTemplateSelector? ItemTemplateSelector { get; set; }

Property Value

DataTemplateSelector

Label

The text label to display.

public string? Label { get; set; }

Property Value

string

MinItemHeight

The minimum item height.

public double MinItemHeight { get; set; }

Property Value

double:

The default value is 16.0.

MinItemWidth

The minimum item width.

public double MinItemWidth { get; set; }

Property Value

double:

The default value is 16.0.

SmallImageSource

The ImageSource for a small image, generally 16x16 size.

public ImageSource? SmallImageSource { get; set; }

Property Value

ImageSource

Title

The string title, which can override the Label when displayed in screen tips and customization UI.

public string? Title { get; set; }

Property Value

string

Inherited Members

Extension Methods