BarToggleButtonViewModel Class
Represents a view model for a toggle button control within a bar control.
public class BarToggleButtonViewModel : BarButtonViewModel, INotifyPropertyChanged, IHasKey, IHasVariantImages, ICheckable
- Inheritance:
- System.Object ObservableObjectBase BarKeyedObjectViewModelBase BarButtonViewModel Object
- Derived:
- BarCheckBoxViewModel
- Implements:
- IHasKey IHasVariantImages ICheckable
Constructors
BarToggleButtonViewModel()
Initializes a new instance of the class.
public BarToggleButtonViewModel()
BarToggleButtonViewModel(String)
Initializes a new instance of the class with the specified key. The label and key tip text are auto-generated.
public BarToggleButtonViewModel(string key)
Parameter | Type | Description |
---|---|---|
key | System.String | A string that uniquely identifies the control. |
BarToggleButtonViewModel(String, String)
Initializes a new instance of the class with the specified key and label. The key tip text is auto-generated.
public BarToggleButtonViewModel(string key, string label)
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 |
BarToggleButtonViewModel(String, String, String)
Initializes a new instance of the class with the specified key, label, and key tip text.
public BarToggleButtonViewModel(string key, string label, string keyTipText)
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 |
keyTipText | System.String | The key tip text, which is auto-generated from the |
BarToggleButtonViewModel(String, String, String, ICommand)
Initializes a new instance of the class with the specified key, label, key tip text, and command.
public BarToggleButtonViewModel(string key, string label, string keyTipText, 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 |
keyTipText | System.String | The key tip text, which is auto-generated from the |
command | System.Windows.Input.ICommand | The command to attach to the control. |
BarToggleButtonViewModel(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 BarToggleButtonViewModel(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. |
BarToggleButtonViewModel(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 BarToggleButtonViewModel(string key, ICommand command)
Parameter | Type | Description |
---|---|---|
key | System.String | A string that uniquely identifies the control. |
command | System.Windows.Input.ICommand | The command to attach to the control. |
BarToggleButtonViewModel(RoutedCommand)
Initializes a new instance of the class with the specified System.Windows.Input.RoutedCommand, also used to auto-generate a key, label, and key tip text.
public BarToggleButtonViewModel(RoutedCommand routedCommand)
Parameter | Type | Description |
---|---|---|
routedCommand | System.Windows.Input.RoutedCommand | The command to attach to the control. |
Properties
IsChecked
Gets or sets whether the control is checked.
public bool IsChecked { get; set; }
Property Value
- System.Boolean:
true
if the control is checked; otherwise,false
.
Inherited Members
- BarButtonViewModel.CanCloneToRibbonQuickAccessToolBar
- BarButtonViewModel.Command
- BarButtonViewModel.CommandParameter
- BarButtonViewModel.Description
- BarButtonViewModel.InputGestureText
- BarButtonViewModel.IsInputGestureTextVisible
- BarButtonViewModel.KeyTipText
- BarButtonViewModel.Label
- BarButtonViewModel.LargeImageSource
- BarButtonViewModel.MediumImageSource
- BarButtonViewModel.SmallImageSource
- BarButtonViewModel.StaysOpenOnClick
- BarButtonViewModel.Title
- BarButtonViewModel.ToolBarItemCollapseBehavior
- BarButtonViewModel.ToolBarItemVariantBehavior
- BarButtonViewModel.UseLargeMenuItem
- 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()