BarGalleryViewModelBase Class
Represents an abstract view model base for a gallery control within a bar control.
public abstract class BarGalleryViewModelBase : BarKeyedObjectViewModelBase, INotifyPropertyChanged, IHasKey
- Inheritance:
- System.Object ObservableObjectBase BarKeyedObjectViewModelBase Object
- Implements:
- IHasKey
Constructors
BarGalleryViewModelBase()
Initializes a new instance of the class.
protected BarGalleryViewModelBase()
BarGalleryViewModelBase(String)
Initializes a new 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 | System.String | A string that uniquely identifies the control. |
BarGalleryViewModelBase(String, String, ICommand)
Initializes a new 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 | System.String | A string that uniquely identifies the control. |
label | System.String | The text label to display, which is auto-generated from the |
command | System.Windows.Input.ICommand | The command to attach to the control. |
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
.
CanCloneToRibbonQuickAccessToolBar
Gets or sets whether the control can be cloned to the ribbon quick-access toolbar.
public bool CanCloneToRibbonQuickAccessToolBar { get; set; }
Property Value
- System.Boolean:
true
if the control can be cloned to the ribbon quick-access toolbar; otherwise,false
. The default value istrue
.
Command
Gets or sets the System.Windows.Input.ICommand to attach to the control.
public ICommand Command { get; set; }
Property Value
- System.Windows.Input.ICommand:
The System.Windows.Input.ICommand to attach to the control.
ItemContainerStyle
Gets or sets the System.Windows.Style to apply to gallery item container elements.
public Style ItemContainerStyle { get; set; }
Property Value
- System.Windows.Style:
The System.Windows.Style to apply to gallery item container elements.
ItemContainerStyleSelector
Gets or sets the System.Windows.Controls.StyleSelector that picks a System.Windows.Style to apply to gallery item container elements.
public StyleSelector ItemContainerStyleSelector { get; set; }
Property Value
- System.Windows.Controls.StyleSelector:
The System.Windows.Controls.StyleSelector that picks a System.Windows.Style to apply to gallery item container elements.
ItemSpacing
Gets or sets the amount of spacing between gallery items.
public double ItemSpacing { get; set; }
Property Value
- System.Double:
The amount of spacing between gallery items. The default value is
0.0
.
ItemTemplate
Gets or sets the System.Windows.DataTemplate used to display the content for each gallery item.
public DataTemplate ItemTemplate { get; set; }
Property Value
- System.Windows.DataTemplate:
The System.Windows.DataTemplate used to display the content for each gallery item.
ItemTemplateSelector
Gets or sets the System.Windows.Controls.DataTemplateSelector that picks a System.Windows.DataTemplate used to display the content for each gallery item.
public DataTemplateSelector ItemTemplateSelector { get; set; }
Property Value
- System.Windows.Controls.DataTemplateSelector:
The System.Windows.Controls.DataTemplateSelector that picks a System.Windows.Controls.DataTemplateSelector used to display the content for each gallery item.
Label
Gets or sets the text label to display.
public string Label { get; set; }
Property Value
- System.String:
The text label to display.
MinItemHeight
Gets the minimum item height.
public double MinItemHeight { get; set; }
Property Value
- System.Double:
The minimum item height. The default value is
16.0
.
MinItemWidth
Gets the minimum item width.
public double MinItemWidth { get; set; }
Property Value
- System.Double:
The minimum item width. The default value is
16.0
.
SmallImageSource
Gets or sets the System.Windows.Media.ImageSource for a small image, generally 16x16
size.
public ImageSource SmallImageSource { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The System.Windows.Media.ImageSource for a small image.
Title
Gets or sets the string title, which can override the Label when displayed in screen tips and customization UI.
public string Title { get; set; }
Property Value
- System.String:
The string title.
Inherited Members
- BarKeyedObjectViewModelBase.ToString()
- BarKeyedObjectViewModelBase.Key
- ObservableObjectBase.NotifyPropertyChanged(String)
- ObservableObjectBase.OnPropertyChanged(PropertyChangedEventArgs)
- ObservableObjectBase.PropertyChanged
- 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()