Kod strony XAML dla aplikacji MauiApp4 

<?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="MauiApp4.MainPage"> 

 

<ScrollView> 

     <Grid> 

         <Grid.RowDefinitions> 

             <RowDefinition Height="Auto" /> 

         </Grid.RowDefinitions> 

         <Grid.ColumnDefinitions> 

             <ColumnDefinition Width="*" /> 

         </Grid.ColumnDefinitions> 

 

         <!-- Kontener dla całej zawartości ograniczony do 850px --> 

         <VerticalStackLayout 

             Padding="30,0" 

             Spacing="25" 

             MaximumWidthRequest="550" 

             HorizontalOptions="Center" 

             VerticalOptions="CenterAndExpand"> 

 

             <Label 

                 Text="Witaj na kolejnej lekcji. Dziś podłączanie zdarzeń do Buttonów" 

                 Style="{StaticResource Headline}" 

                 SemanticProperties.HeadingLevel="Level1" /> 

 

             <Button 

                 x:Name="welcome" 

                 Text="WELCOME" 

                 Clicked="OnWelcomeClicked" /> 

 

             <Label Text="Chcesz usłyszeć coś miłego?" /> 

             <Button 

                 x:Name="buttonX" 

                 Text="klikni aby zobaczyć prawdę..:)" 

                 Clicked="OnButtonXClicked" /> 

 

             <Label Text="Obliczymy pole prostokąta" /> 

             <Entry 

                 x:Name="textInput1" Placeholder="Podaj długość boku a" /> 

             <Entry 

                 x:Name="textInput2" Placeholder="Podaj długość boku b" /> 

             <Button 

                 x:Name="buttonY" 

                 Text="oblicz pole prostokąta" 

                 Clicked="OnButtonYClicked" /> 

 

             <Entry x:Name="textInput" Placeholder="Wprowadź tekst" /> 

             <Button 

                 x:Name="buttonZ" 

                 Text="Click me" 

                 Clicked="OnButtonZClicked" /> 

         </VerticalStackLayout> 

     </Grid> 

</ScrollView> 

</ContentPage>