using VmWrapperExpress.DomainModel; namespace VmWrapperExpress.ViewModel { public class PropertySpecVM : ViewModelBase { #region Constructor public PropertySpecVM(PropertySpecDM propertySpecsDM) { this.Initialize(propertySpecsDM); } #endregion #region InternalProperties /// <summary> /// The domain object wrapped by this view model object. /// </summary> public PropertySpecDM DomainObject { get; set; } #endregion #region Bindable Properties /// <summary> /// Whether this property is selected in the UI. /// </summary> public bool IsSelected { get { return DomainObject.IsSelected; } set { DomainObject.IsSelected = value; this.FirePropertyChangedEvent("IsSelected"); } } /// <summary> /// The name of this property. /// </summary> public string Profile { get { return DomainObject.Profile; } } #endregion #region Overrides public override string ToString() { return this.Profile; } #endregion #region Private Methods /// <summary> /// Initializes this view model object. /// </summary> /// <param name="domainObject">The domain object to wrap.</param> private void Initialize(PropertySpecDM domainObject) { this.DomainObject = domainObject; this.IsSelected = domainObject.IsSelected; } #endregion } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)