示例#1
0
        static bool NeedsFullName(XamlProperty property, XElement elem)
        {
            var p = elem.Parent;

            while (p != null && p.Annotation <XamlType>()?.ResolvedType.FullName != "System.Windows.Style")
            {
                p = p.Parent;
            }
            var type = p?.Annotation <TargetTypeAnnotation>()?.Type;

            return(type == null || property.IsAttachedTo(type));
        }
示例#2
0
        private bool NeedsFullName(XamlProperty property, XamlContext ctx, XElement elem)
        {
            XElement p = elem.Parent;

            while (p != null && p.Annotation <XamlType>()?.ResolvedType.FullName != "System.Windows.Style")
            {
                p = p.Parent;
            }
            var type = p?.Annotation <TargetTypeAnnotation>()?.Type;

            if (type == null)
            {
                return(true);
            }
            return(property.IsAttachedTo(type));
        }