[Solved] XAML Extension for GravatarImageSource #679
Replies: 4 comments 2 replies
-
@bijington @GeorgeLeithead - what do you think? |
Beta Was this translation helpful? Give feedback.
-
Hey, @egvijayanand, thanks for your proposal. Let's say that .NET MAUI has a secret gem that allows you to describe any control using markups, so you don't need to create markup for these types, for example, let's say that you want to do a rounded border, you can do that in two ways: <Border
StrokeThickness="4">
<Border.StrokeShape>
<RoundRectangle CornerRadius="40,0,0,40" />
</Border.StrokeShape>
<Label Text="Hello, World!" />
</Border> or <Border
StrokeShape="{RoundRectangle CornerRadius='40,0,0,40'}"
StrokeThickness="4">
<Label
FontSize="32"
HorizontalOptions="Center"
SemanticProperties.HeadingLevel="Level1"
Text="Hello, World!" />
</Border> |
Beta Was this translation helpful? Give feedback.
-
@brminnick Since the special feature of .NET MAUI makes it super easy to define the Source without any need for an explicit extension, this discussion can be marked as resolved/answered. |
Beta Was this translation helpful? Give feedback.
-
Closed and answered |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Though it might be a simple extension, it simplifies the XAML to a greater extent and improves readability.
Before:
After:
Implementation:
Beta Was this translation helpful? Give feedback.
All reactions