Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mdoc/Consts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public static class Consts
public const string JavascriptLowCase = "javascript";

public const string DependencyPropertyFullName = "System.Windows.DependencyProperty";
public const string DependencyPropertyFullNameXaml = "Windows.UI.Xaml.DependencyProperty";
public const string DependencyPropertyFullNameWindowsXaml = "Windows.UI.Xaml.DependencyProperty";
public const string DependencyPropertyFullNameMicrosoftXaml = "Microsoft.UI.Xaml.DependencyProperty";

public const string DependencyObjectFullName = "System.Windows.DependencyObject";
public const string DependencyObjectFullNameXaml = "Windows.UI.Xaml.DependencyObject";
Expand Down
9 changes: 6 additions & 3 deletions mdoc/Mono.Documentation/Util/AttachedEntitiesHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ private static IEnumerable<AttachedPropertyReference> GetAttachedProperties(Type
}

foreach (var property in type.Properties.Where(t => t.PropertyType.FullName == Consts.DependencyPropertyFullName
|| t.PropertyType.FullName == Consts.DependencyPropertyFullNameXaml))
|| t.PropertyType.FullName == Consts.DependencyPropertyFullNameWindowsXaml
|| t.PropertyType.FullName == Consts.DependencyPropertyFullNameMicrosoftXaml))
{
if (IsAttachedProperty(property, methods))
yield return new AttachedPropertyReference(property);
Expand All @@ -138,7 +139,8 @@ private static bool IsAttachedProperty(FieldDefinition field, Dictionary<string,

return !hasExistingProperty.IsTrue () && !hasExistingField.IsTrue () &&
// Class X has a static field of type DependencyProperty [Name]Property
(field.FieldType.FullName == Consts.DependencyPropertyFullName || field.FieldType.FullName == Consts.DependencyPropertyFullNameXaml)
(field.FieldType.FullName == Consts.DependencyPropertyFullName || field.FieldType.FullName == Consts.DependencyPropertyFullNameWindowsXaml
|| field.FieldType.FullName == Consts.DependencyPropertyFullNameMicrosoftXaml)
&& field.IsPublic
&& field.IsStatic
&& field.IsInitOnly
Expand All @@ -163,7 +165,8 @@ private static bool IsAttachedProperty(PropertyDefinition property, Dictionary<s

return !hasExistingProperty.IsTrue() && !hasExistingField.IsTrue() &&
// Class X has a static field of type DependencyProperty [Name]Property
(property.PropertyType.Name == Consts.DependencyPropertyFullName || property.PropertyType.FullName == Consts.DependencyPropertyFullNameXaml)
(property.PropertyType.FullName == Consts.DependencyPropertyFullName || property.PropertyType.FullName == Consts.DependencyPropertyFullNameWindowsXaml
|| property.PropertyType.FullName == Consts.DependencyPropertyFullNameMicrosoftXaml)


// Class X also has static methods with the following names: Get[Name] and Set[Name]
Expand Down