How do I set a background image for a border?

Platform: .NET MAUI| Category: General

To set a background image for a Border, you can use an Image element as the content within the Border. Here’s an example:
XAML:

<Border x:Name="border1" Stroke="Black" Padding="0" WidthRequest="200" HeightRequest="100">
	<Image Source="dotnet_bot.png" Aspect="Center"/>
</Border>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.