Exemplo n.º 1
0
        private XamlProperty LookupDependsOn()
        {
            object obj = LookupCustomAttribute(typeof(DependsOnAttribute));

            if (obj == null)
            {
                return(null);
            }
            else
            {
                string       doPropertyName = ((DependsOnAttribute)obj).Name;
                XamlProperty xp             = _declaringType.GetProperty(doPropertyName);
                if (xp != null)
                {
                    return(xp);
                }
                else
                {
                    string err = SR.Get(SRID.UnknownAttributeProperty, typeof(DependsOnAttribute).Name, doPropertyName, _name);
                    throw new XamlSchemaException(err);
                }
            }
        }