|
using System;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Windows.Forms;
using System.Drawing.Design;
namespace XmlBindingManager
{
/// <summary>
/// Provides the binding between a control property and a xml property
/// </summary>
[TypeConverter(typeof(XmlBindingTypeConverter))]
public class XmlBinding
{
#region c'tors
public XmlBinding()
{}
public XmlBinding(Control control)
{
_control = control;
}
public XmlBinding(string boundProperty, string xmlProperty)
{
_controlProperty = boundProperty;
_xmlProperty = xmlProperty;
}
#endregion
#region Properties
[Browsable(false)]
public Control Control
{
get { return _control; }
set { _control = value; }
}
[Description("Property name of the bound property of this control")]
public string BoundProperty
{
get { return _controlProperty; }
set { _controlProperty = value; }
}
[Description("Property name of the xml wrapper object")]
[Editor(typeof(XmlPropertyEditor), typeof(UITypeEditor))]
public string XmlProperty
{
get { return _xmlProperty; }
set { _xmlProperty = value; }
}
#endregion
#region Fields
private Control _control;
private string _controlProperty;
private string _xmlProperty;
#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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here