public IStyleProperty SetStyleProperty(string name, string value) { if (String.IsNullOrEmpty(name)) { return(null); } StyleProperty property = null; if (Contains(name)) { property = _styleProperties[name]; if (property != null && property.Value != value) { property.Value = value; } } if (property == null) { property = new StyleProperty(name, value); _styleProperties[name] = property; } return(property); }
internal void SetStyleProperty(StyleProperty property) { if (property == null || String.IsNullOrEmpty(property.Name)) { return; } _styleProperties[property.Name] = property; }