Suma 4.0

Start the integrated development environment Microsoft Visual Studio 2026, create a new project and name it Suma 4.0.

MainPage.xaml

This file contains the source code for the application's user interface design.

<!-- User Interface (UI): Suma 4.0 -->
<StackLayout Padding="20">

    <!-- Title -->
    <Label Text="Suma 4.0" FontSize="Large" />

    <!-- A -->
    <Label Text="A=" />
    <Entry x:Name="boxA" Keyboard="Numeric" />

    <!-- B -->
    <Label Text="B=" />
    <Entry x:Name="boxB" Keyboard="Numeric" />

    <!-- A+B -->
    <Label Text="A+B=" />
    <Entry x:Name="boxAB" Keyboard="Numeric" />

    <!-- Button -->
    <Button Text="Sum" Clicked="OnButtonClicked" />

</StackLayout>

MainPage.xaml.cs

This file contains the source code for the application's business logic.

Running the app

Run the application and test its functionality as shown in the figure below.

Fig. 4.9. Suma 4.0

triangle-exclamation

Last updated