In This Article

BarToggleButtonViewModel Class

Represents a view model for a toggle button control within a bar control.

public class BarToggleButtonViewModel : BarButtonViewModel, IHasKey, IHasVariantImages, ICheckable
Inheritance:
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 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 string

A string that uniquely identifies the control.

label string

The text label to display, which is auto-generated from the key if null.

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 string

A string that uniquely identifies the control.

label string

The text label to display, which is auto-generated from the key if null.

keyTipText string

The key tip text, which is auto-generated from the label if null.

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 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.

keyTipText string

The key tip text, which is auto-generated from the command or label if null.

command 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 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.

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 string

A string that uniquely identifies the control.

command ICommand

The command to attach to the control.

Properties

IsChecked

Indicates whether the control is checked.

public bool IsChecked { get; set; }

Property Value

bool

Inherited Members

Extension Methods