public IStyleProperty SetStyleProperty(string name, double value) { if (String.IsNullOrEmpty(name)) { return(null); } StyleDoubleProperty property = null; if (Contains(name)) { property = _styleProperties[name] as StyleDoubleProperty; if (property != null && property.DoubleValue != value) { property.DoubleValue = value; } } if (property == null) { property = new StyleDoubleProperty(name, value); _styleProperties[name] = property; } return(property); }
protected bool LoadStyleDoubleProperty(XmlElement parentElement, string propertyName) { XmlElement propertyElement = parentElement[propertyName]; if (propertyElement != null) { string value = null; if (LoadStringFromChildElementInnerText("Value", propertyElement, ref value)) { StyleDoubleProperty property = new StyleDoubleProperty(propertyName, 0); if (property.SetStringValue(value)) { SetStyleProperty(property); return(true); } } } return(false); }