/// <summary> /// Initializes a new SimplePropertyMap instance mapping for a calculated /// value. /// </summary> private static SimplePropertyMap FromDelegate(DependencyProperty property, CalculateValueCallback callback, string xmlName) { SimplePropertyMap result = new SimplePropertyMap(); result.Property = property; result.CalculateValue = callback; result.XmlName = xmlName; return(result); }
/// <summary> /// Initializes a new SimplePropertyMap instance mapping for the given /// value in an XML name/value pair, such that the value applied is /// the vaule of the XML attribute. /// </summary> private static SimplePropertyMap FromAttributeValue(DependencyProperty property, string xmlName, string xmlAttribute) { SimplePropertyMap result = new SimplePropertyMap(); result.Property = property; result.UseAttributeValue = true; result.XmlAttribute = xmlAttribute; result.XmlName = xmlName; return(result); }
/// <summary> /// Initializes a new SimplePropertyMap instance mapping for the given /// value in an XML name/value pair. /// </summary> private static SimplePropertyMap FromAttribute(DependencyProperty property, object value, string xmlName, string xmlAttribute, string xmlValue) { SimplePropertyMap result = new SimplePropertyMap(); result.Property = property; result.Value = value; result.XmlAttribute = xmlAttribute; result.XmlName = xmlName; result.XmlValue = xmlValue; return(result); }
/// <summary> /// Initializes a new SimplePropertyMap instance mapping for a calculated /// value. /// </summary> private static SimplePropertyMap FromDelegate(DependencyProperty property, CalculateValueCallback callback, string xmlName) { SimplePropertyMap result = new SimplePropertyMap(); result.Property = property; result.CalculateValue = callback; result.XmlName = xmlName; return result; }
/// <summary> /// Initializes a new SimplePropertyMap instance mapping for the given /// value in an XML name/value pair, such that the value applied is /// the vaule of the XML attribute. /// </summary> private static SimplePropertyMap FromAttributeValue(DependencyProperty property, string xmlName, string xmlAttribute) { SimplePropertyMap result = new SimplePropertyMap(); result.Property = property; result.UseAttributeValue = true; result.XmlAttribute = xmlAttribute; result.XmlName = xmlName; return result; }
/// <summary> /// Initializes a new SimplePropertyMap instance mapping for the given /// value in an XML name/value pair. /// </summary> private static SimplePropertyMap FromAttribute(DependencyProperty property, object value, string xmlName, string xmlAttribute, string xmlValue) { SimplePropertyMap result = new SimplePropertyMap(); result.Property = property; result.Value = value; result.XmlAttribute = xmlAttribute; result.XmlName = xmlName; result.XmlValue = xmlValue; return result; }