19 using System.Collections.Generic;
32 where T : struct, IConvertible
34 #region Public properties 36 public T Value {
get;
private set; }
37 public string Description
46 OnPropertyChanged(
"Description");
59 OnPropertyChanged(
"ToolTip");
72 OnPropertyChanged(
"IsEnabled");
90 _description = description;
93 internal EnumViewModel(T value,
string description,
string toolTip)
94 :
this(value, description)
99 internal EnumViewModel(T value,
string description,
string toolTip,
101 :
this(value, description, toolTip)
103 _isEnabled = isEnabled;
106 internal EnumViewModel(T value,
string description,
bool isEnabled)
107 :
this(value, description)
109 _isEnabled = isEnabled;
116 public override string DisplayString
120 if (String.IsNullOrEmpty(Description))
122 return Value.ToString();
131 public override string ToString()
133 return DisplayString;
138 #region Implementation of ViewModelBase 147 #region Private fields 149 private string _description;
150 private string _toolTip;
151 private bool _isEnabled;
override object RevealModelObject()
Returns the model object that this view model wraps or null if there is no wrapped model object...
View model for enum members.