private object ParseAttributeValue (XamlObjectElement element, XamlPropertySetter property, XamlAttribute ai) { object value = null; if (IsMarkupExpression (ai.Value)) value = ParseAttributeMarkup (element, property, ai); else { try { value = property.ConvertTextValue (ai.Value); } catch (Exception ex) { throw ParseException ("Could not convert attribute value '{0}' on element {1} for property {2}.", ai.Value, element.Name, property.Name); } } return value; }
private object ParseAttributeValue (XamlObjectElement element, XamlPropertySetter property) { object value = null; if (IsMarkupExpression (reader.Value)) value = ParseAttributeMarkup (element, property); else { value = property.ConvertTextValue (reader.Value); } return value; }