예제 #1
0
 protected static Type GetTypeFromXName(XName xName)
 {
     string ns = xName.Namespace.NamespaceName;
     if (string.IsNullOrEmpty(ns))
         ns = "http://schemas.microsoft.com/netfx/2007/xaml/presentation";
     var xamlSchemaContext = new XamlSchemaContextWithDefault();
     return xamlSchemaContext.GetXamlType(new XamlTypeName(ns, xName.LocalName)).UnderlyingType;
 }
예제 #2
0
    protected static Type GetTypeFromXName(XName xName)
    {
        string ns = xName.Namespace.NamespaceName;

        if (string.IsNullOrEmpty(ns))
        {
            ns = "http://schemas.microsoft.com/netfx/2007/xaml/presentation";
        }
        var xamlSchemaContext = new XamlSchemaContextWithDefault();

        return(xamlSchemaContext.GetXamlType(new XamlTypeName(ns, xName.LocalName)).UnderlyingType);
    }