BarButtonViewModel Class
Represents a view model for a regular button control within a bar control.
public class BarButtonViewModel : BarKeyedObjectViewModelBase, IHasKey, IHasVariantImages
- Inheritance:
- object ObservableObjectBase BarKeyedObjectViewModelBase object
- Derived:
- BarToggleButtonViewModel
- Implements:
- IHasKey IHasVariantImages
Constructors
BarButtonViewModel()
Initializes a new instance of the class.
public BarButtonViewModel()
BarButtonViewModel(string?)
Initializes a new instance of the class with the specified key. The label and key tip text are auto-generated.
public BarButtonViewModel(string? key)
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
BarButtonViewModel(string?, string?)
Initializes a new instance of the class with the specified key and label. The key tip text is auto-generated.
public BarButtonViewModel(string? key, string? label)
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 |
BarButtonViewModel(string?, string?, string?)
Initializes a new instance of the class with the specified key, label, and key tip text.
public BarButtonViewModel(string? key, string? label, string? keyTipText)
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 |
BarButtonViewModel(string?, string?, string?, ICommand?)
Initializes a new instance of the class with the specified key, label, key tip text, and command.
public BarButtonViewModel(string? key, string? label, string? keyTipText, 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 |
keyTipText | string | The key tip text, which is auto-generated from the |
command | ICommand | The command to attach to the control. |
BarButtonViewModel(string?, string?, ICommand?)
Initializes a new instance of the class with the specified key, label, and command. The key tip text is auto-generated.
public BarButtonViewModel(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 | ICommand | The command to attach to the control. |
BarButtonViewModel(string?, ICommand?)
Initializes a new instance of the class with the specified key and command. The label and key tip text are auto-generated.
public BarButtonViewModel(string? key, ICommand? command)
Parameter | Type | Description |
---|---|---|
key | string | A string that uniquely identifies the control. |
command | ICommand | The command to attach to the control. |
Properties
CanCloneToRibbonQuickAccessToolBar
Indicates whether the control can be cloned to the ribbon quick-access toolbar.
public bool CanCloneToRibbonQuickAccessToolBar { get; set; }
Property Value
- bool:
The default value is
true
.
Command
The ICommand to attach to the control.
CommandParameter
The parameter to pass to the Command property.
Description
The text description to display in screen tips.
InputGesture
The input gesture to display in menu items and screen tips.
public KeyGesture? InputGesture { get; set; }
Property Value
- KeyGesture
IsInputGestureTextVisible
Indicates whether the input gesture text is allowed to be visible in the user interface.
IsVisible
Indicates whether the control is currently visible.
KeyTipText
The key tip text used to access the control.
Label
The text label to display.
LargeIcon
The object representing a large icon, generally 32x32
size.
MediumIcon
The object representing a medium icon, generally 24x24
size.
SmallIcon
The object representing a small icon, generally 16x16
size.
StaysOpenOnClick
Indicates whether menus should try and remain open when the control is clicked.
Title
The string title, which can override the Label when displayed in screen tips and customization UI.
ToolBarItemCollapseBehavior
The ItemCollapseBehavior for the control when in a ribbon using Simplified layout mode.
public ItemCollapseBehavior ToolBarItemCollapseBehavior { get; set; }
Property Value
- ItemCollapseBehavior:
The default value is
Default
.
ToolBarItemVariantBehavior
The ItemVariantBehavior for the control when in a toolbar, which also applies when in a ribbon using Simplified layout mode.
public ItemVariantBehavior ToolBarItemVariantBehavior { get; set; }
Property Value
- ItemVariantBehavior:
The default value is AlwaysSmall.
UseLargeMenuItem
Indicates whether to use a large size when the control is a menu item.
Inherited Members
- BarKeyedObjectViewModelBase.ToString()
- BarKeyedObjectViewModelBase.Key
- ObservableObjectBase.OnPropertyChanged(string)
- ObservableObjectBase.OnPropertyChanged(PropertyChangedEventArgs)
- ObservableObjectBase.OnPropertyChanging(string)
- ObservableObjectBase.OnPropertyChanging(PropertyChangingEventArgs)
- ObservableObjectBase.SetProperty<T>(ref T, T, string)
- ObservableObjectBase.PropertyChanged
- ObservableObjectBase.PropertyChanging
- object.GetType()
- object.MemberwiseClone()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()