.NET MAUI – Forget Me Not – Part 2

In Part 1 we created the skeleton of Forget Me Not (and explained what it is). Here in Part 2 we’ll add an about page. This is so easy that this will be a short post.

Create the page

Creating the page is almost indistinguishable from doing so in Xamarin.Forms. Here’s the XAML for the page:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
    x:Class="ForgetMeNot.About"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
    <VerticalStackLayout Margin="10" Spacing="10">
        <HorizontalStackLayout Spacing="10">
            <Image HeightRequest="64" Source="flower.png" />
            <Label
                FontAttributes="Bold"
                FontSize="22"
                Text="About this app"
                VerticalOptions="End" />
            <Label
                FontSize="22"
                Text="v1.0"
                VerticalOptions="End" />
        </HorizontalStackLayout>

        <Label Text="This app is written in XAML and C# with .NET MAUI by Jesse Liberty and Rodrigo Juarez. Concept and original design by Robin Liberty" />
    </VerticalStackLayout>
</ContentPage>

We put a picture of a forget-me-not flower next to the title. Below that is the version and the acknowledgements. We’ll want to be able to navigate to the About page using a tab at the bottom of the page, so let’s turn to AppShell.xaml and ad the tab there:

<TabBar>
    <ShellContent
        Title="Home"
        ContentTemplate="{DataTemplate local:MainPage}"
        Icon="icon_notes" />

    <ShellContent
        Title="About"
        ContentTemplate="{DataTemplate local:About}"
        Icon="icon_about" />

Next we open AppShell.xaml.cs and add the route

public AppShell()
{
	InitializeComponent();


    Routing.RegisterRoute("about", typeof(About));

}

That’s it! We created the page, created the tab and told MAUI where to find the page by registering the route.

Unknown's avatar

About Jesse Liberty

Jesse Liberty has three decades of experience writing and delivering software projects and is the author of 2 dozen books and a couple dozen online courses. Liberty is a Senior AI Engineer at the University of Pittsburgh Medical Center, and was a Team Lead and Senior Software Engineer for various corporations, a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a 21 year Microsoft MVP.
This entry was posted in Essentials. Bookmark the permalink.

27 Responses to .NET MAUI – Forget Me Not – Part 2

  1. References:

    Casino online roulette

    References:
    annunciogratis.net

  2. Your point of view caught my eye and was very interesting. Thanks. I have a question for you.

  3. I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

  4. References:

    Taking anabolic steroids to look more muscular is
    an example of:

    References:
    https://git.daoyoucloud.com/royparenteau51

  5. phlbestapk's avatar phlbestapk says:

    Looking for apps? phlbestapk is worth checking. Found some good ones. Give phlbestapk a shot. phlbestapk

  6. mxwin27's avatar mxwin27 says:

    Tried mxwin27 the other day. Not too shabby. A fair selection of games. I would play mxwin27 again soon. mxwin27

  7. mxn777casino's avatar mxn777casino says:

    MXN777casino? Yeah, I’ve spent some time there. Honestly, pretty good experience all around and a good place to potentially win. mxn777casino

  8. circus circus casino

    References:
    itkvariat.com

  9. Thanks for sharing. I read many of your blog posts, cool, your blog is very good. https://www.binance.com/join?ref=QCGZMHR6

  10. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me? https://accounts.binance.info/ar/register-person?ref=FIHEGIZ8

  11. I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article. https://www.binance.info/uk-UA/register?ref=XZNNWTW7

  12. Thanks for sharing. I read many of your blog posts, cool, your blog is very good. https://accounts.binance.info/es-AR/register-person?ref=UT2YTZSU

  13. Thanks for sharing. I read many of your blog posts, cool, your blog is very good.

  14. Thanks for sharing. I read many of your blog posts, cool, your blog is very good. https://www.gate.io/share/XwNAUwgM

  15. I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

  16. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  17. binance's avatar binance says:

    Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  18. Thanks for sharing. I read many of your blog posts, cool, your blog is very good.

  19. Your article helped me a lot, is there any more related content? Thanks!

  20. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  21. I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

Comments are closed.