view SilverlightGlimpse/Models/BrokenBinding.cs @ 59:3591c26bd63e

MVVMLight added
author Steven Hollidge <stevenhollidge@hotmail.com>
date Sat, 21 Apr 2012 19:20:28 +0100
parents
children
line wrap: on
line source

using System;

namespace SilverlightGlimpse.Models
{
    public class BrokenBinding
    {
        #region Fields

        private string _controlName = string.Empty;
        private string _controlTypeName = string.Empty;
        private string _path = string.Empty;
        private string _propertyName = string.Empty;

        #endregion

        #region Constructor

        public BrokenBinding(string controlName, string controlTypeName, string propertyName, string path)
        {
            _controlName = controlName;
            _controlTypeName = controlTypeName;
            _propertyName = propertyName;
            _path = path;
        }

        #endregion

        #region Properties

        public string ControlName { get { return string.IsNullOrEmpty(_controlName) ? "(none)" : _controlName; } }
        public string ControlTypeName { get { return _controlTypeName; } }
        public string Path { get { return _path; } }
        public string PropertyName { get { return _propertyName; } }

        #endregion

        #region Methods

        public override string ToString()
        {
            return string.Format(
                "Control Name: {0}, Type: {1}, Property: {2}, Path: {3}",
                this.ControlName,
                this.ControlTypeName,
                this.PropertyName,
                this.Path);
        }

        #endregion
    }
}