3 August 2022

Border Example in MAUI

 In this example we are going to see Border Example in MAUI.  

1) Add new page and Update code as below.

<?xml version="1.0" encoding="utf-8" ?>

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"

             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"

             x:Class="MauiApp1.BorderEXP1"

             Title="BorderEXP1">

    <VerticalStackLayout>

        <Border Stroke="red" StrokeThickness="4" BackgroundColor="Green">

            <Border.StrokeShape>

                <RoundRectangle CornerRadius="40,0,0,40"></RoundRectangle>

            </Border.StrokeShape>

        <Label 

            Text="Welcome to .NET MAUI!"

            VerticalOptions="Center" 

            HorizontalOptions="Center" />

        </Border>

    </VerticalStackLayout>

</ContentPage>

Output:


Code in Githubhttps://github.com/adi501/MAUI
 

No comments:

Post a Comment