コード例 #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
ファイル: PropertyCustomHandler.cs プロジェクト: zz110/ILSpy
        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));
        }