Suma 3.0

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

MainPage.xaml

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

<!-- User Interface (UI): Suma 3.0 -->
<StackPanel Padding="50" Background="Orange">

    <!-- Title -->
    <TextBlock Text="Suma 3.0" FontSize="42" />

    <!-- A -->
    <TextBlock Text="A=" FontSize="24" />
    <TextBox x:Name="boxA" FontSize="24" />

    <!-- B -->
    <TextBlock Text="B=" FontSize="24" />
    <TextBox x:Name="boxB" FontSize="24" />

    <!-- A+B -->
    <TextBlock Text="A+B=" FontSize="24" />
    <TextBox x:Name="boxAB" FontSize="24" />

    <!-- Button -->
    <Button Content="Sum" FontSize="24"
            Margin="0 20 0 0" Padding="20 10 20 10"
            Click="OnButtonClicked" />

</StackPanel>

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. 3.8. Suma 3.0

triangle-exclamation

Last updated