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)); }
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)); }