namespace JD.Oasis.Module.ViewModel.TreeViewModel.Common
{
///
/// Provides a common implementation of a tree node model that supports checking.
///
public class CheckableTreeNodeViewModel : TreeNodeViewModel
{
private bool _isCheckable;
private bool? _isChecked = false;
/////////////////////////////////////////////////////////////////////////////////////////////////////
// CONSTRUCTOR
/////////////////////////////////////////////////////////////////////////////////////////////////////
public CheckableTreeNodeViewModel(string name) : base(name)
{}
/////////////////////////////////////////////////////////////////////////////////////////////////////
// PUBLIC PROCEDURES
/////////////////////////////////////////////////////////////////////////////////////////////////////
///
/// Gets or sets whether the node is checkable.
///
///
/// true if the node is checkable; otherwise, false.
///
public bool IsCheckable
{
get => _isCheckable;
set => SetProperty(ref _isCheckable, value);
}
///
/// Gets or sets whether the node is checked.
///
///
/// true if the node is checked; otherwise, false.
///
public bool? IsChecked
{
get => _isChecked;
set => SetProperty(ref _isChecked, value);
}
}
}