CheckBoxCell Class
Definition
Represents a cell in a Avalonia.Controls.Models.TreeDataGrid that contains a checkbox control.
public class CheckBoxCell
Remarks
The Avalonia.Controls.Models.TreeDataGrid.CheckBoxCell class provides checkbox functionality within a TreeDataGrid cell, supporting both read-only and editable states, as well as two-state and three-state checkbox behavior.
This class serves as the data model that backs the Avalonia.Controls.Primitives.TreeDataGridCheckBoxCell primitive control. The control handles UI rendering and user interactions, while this model manages the underlying data and state.
Constructors
| Name | Description |
|---|---|
| CheckBoxCell (2 overloads) | No summary available. |
CheckBoxCell overloads
CheckBoxCell Constructor
public CheckBoxCell(IObserver<Avalonia.Data.BindingValue<Nullable<bool>>> bindingObserver, IObservable<Avalonia.Data.BindingValue<Nullable<bool>>> bindingObservable, bool isReadOnly, bool isThreeState)
Parameters
bindingObserver IObserver<Avalonia.Data.BindingValue<Nullable<bool>>>
bindingObservable IObservable<Avalonia.Data.BindingValue<Nullable<bool>>>
isReadOnly bool
isThreeState bool
CheckBoxCell Constructor
public CheckBoxCell(Nullable<bool> value)
Parameters
value Nullable<bool>
Methods
| Name | Description |
|---|---|
| Dispose | Disposes the resources used by the Avalonia.Controls.Models.TreeDataGrid.CheckBoxCell. |
Dispose Method
Disposes the resources used by the Avalonia.Controls.Models.TreeDataGrid.CheckBoxCell.
public void Dispose()
Properties
| Name | Description |
|---|---|
| CanEdit | Gets a value indicating whether the cell can enter edit mode. |
| EditGestures | Gets the gestures that cause the cell to enter edit mode. |
| IsReadOnly | Gets a value indicating whether the cell is read-only. |
| IsThreeState | Gets a value indicating whether the checkbox supports three states. |
| Value | Gets or sets the value of the checkbox. |
CanEdit Property
Gets a value indicating whether the cell can enter edit mode.
public bool CanEdit { get; set; }
Remarks
Always returns false as checkbox cells don't support explicit edit mode. Instead, they are toggled directly when clicked.
EditGestures Property
Gets the gestures that cause the cell to enter edit mode.
public Avalonia.Controls.Models.TreeDataGrid.BeginEditGestures EditGestures { get; set; }
Remarks
Returns Avalonia.Controls.Models.TreeDataGrid.BeginEditGestures.None as checkbox cells don't use an edit mode.
IsReadOnly Property
Gets a value indicating whether the cell is read-only.
public bool IsReadOnly { get; set; }
Remarks
When true, the checkbox value cannot be changed by the user.
IsThreeState Property
Gets a value indicating whether the checkbox supports three states.
public bool IsThreeState { get; set; }
Remarks
When true, the checkbox can be in checked, unchecked, or indeterminate states. When false, only checked and unchecked states are supported.
Value Property
Gets or sets the value of the checkbox.
public Nullable<bool> Value { get; set; }
Remarks
The value can be true (checked), false (unchecked), or null (indeterminate, if Avalonia.Controls.Models.TreeDataGrid.CheckBoxCell.IsThreeState is true). Setting this property will update the underlying data if the cell is not read-only.
Events
| Name | Description |
|---|---|
| PropertyChanged | Occurs when a property value changes. Inherited from NotifyingBase. |