.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

** Note ** Jesse is currently looking for a new position. You can learn more about him at https://jesseliberty.bio Thank you. 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. His latest book, Building APIs with .NET, is now available wherever you buy your books. Liberty 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 13 year Microsoft MVP.
This entry was posted in Essentials. Bookmark the permalink.

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

  1. 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.

  2. References:

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

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

  3. phlbestapk's avatar phlbestapk says:

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

  4. 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

  5. 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

  6. circus circus casino

    References:
    itkvariat.com

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

  8. 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

  9. 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

  10. 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

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

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

  13. 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.

  14. 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?

  15. 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?

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

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

  18. 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?

  19. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *