public static DocumentNode GetExpressionFromString(string text, XamlDocument document, DocumentNode parentNode, Type propertyType, out IList <XamlParseError> errors) { if (parentNode != null) { IType type = document.TypeResolver.GetType(propertyType); return(XamlParser.ParseValue((IDocumentRoot)document, parentNode, type, text, out errors)); } errors = (IList <XamlParseError>)null; return((DocumentNode)null); }