Skip to content

Commit

Permalink
feat: Include full namespace for FrameworkPropertyMetadata in generat…
Browse files Browse the repository at this point in the history
…ed code
  • Loading branch information
MartinZikmund committed Mar 20, 2023
1 parent 34e34a4 commit 0df4900
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Uno.UWPSyncGenerator/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,10 @@ abstract class Generator
BaseXamlNamespace + ".Controls.Primitives.CarouselPanel",
BaseXamlNamespace + ".Controls.MediaPlayerPresenter",
BaseXamlNamespace + ".Controls.NavigationViewItemBase",

#if HAS_UNO_WINUI
"Microsoft.UI.Xaml.Media.RadialGradientBrush",
// Mismatching public inheritance hierarchy because RadioMenuFlyoutItem has a double inheritance in WinUI.
// Remove this and update RadioMenuFlyoutItem if WinUI 3 removed the double inheritance.
BaseXamlNamespace + ".Controls.RadioMenuFlyoutItem",
#endif
"Microsoft.UI.Xaml.Controls.RadioMenuFlyoutItem",
};

private Compilation _iOSCompilation;
Expand Down Expand Up @@ -1461,7 +1459,7 @@ protected void BuildProperties(INamedTypeSymbol type, IndentedStringBuilder b, P
}

b.AppendLineInvariant($"\ttypeof({property.ContainingType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}), ");
b.AppendLineInvariant($"\tnew FrameworkPropertyMetadata(default({propertyDisplayType})));");
b.AppendLineInvariant($"\tnew {BaseXamlNamespace}.FrameworkPropertyMetadata(default({propertyDisplayType})));");
}
else
{
Expand Down

0 comments on commit 0df4900

Please sign in to comment.