Build mobile and desktop apps with .NET MAUI Create a cross-platform app with .NET MAUI learning

Sam Tal 21 Reputation points
2024-09-02T07:54:53.3166667+00:00

The "Create a cross-platform app with .NET MAUI" PhoneWord learning module is great, but somewhat confusing.
I am sufficiently experienced in C#, but when mixed with XAML it becomes a challenge.
Please, add the final working project (or a link to) for comparison and debug, and add the file-names on top of each example in the lessons.
Thanks

This question is related to the following Learning Module

Developer technologies | .NET | .NET MAUI
Developer technologies | Visual Studio | Other
{count} votes

3 answers

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 36,441 Reputation points Microsoft External Staff
    2024-09-03T02:10:14.7533333+00:00

    Hello,

    There is no such official sample for now.

    but when mixed with XAML it becomes a challenge.

    Please read the official docs to learn XAML, see XAML - .NET MAUI | Microsoft Learn

    And there are some samples at GitHub- maui-samples/8.0/XAML at main · dotnet/maui-samples · GitHub

    If you have any other issues, please feel free to let me know.

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. arvin lobo 0 Reputation points
    2025-08-15T03:34:08.8966667+00:00
    0 comments No comments

  3. Starry Night 110 Reputation points
    2025-08-15T08:13:16.0466667+00:00

    I am sufficiently experienced in C#, but when mixed with XAML it becomes a challenge.

    I think you are confused because you don't fully understand the relationship between page.xaml.cs (C#) and page.xaml(XAML) .

    XAML (Extensible Application Markup Language) is XML-based markup language that is used to define the user interface in .Net Applications. There are three XAML files that are included in the project template, which are App.xaml, AppShell.xaml, MainPage.xaml. These files are platform agnostic. Each XAML file is in pair with the C# file, which is a code-behind file associated with the XAML file.

    XAML is mostly used to define the visual contents of a page and works together with a C# code-behind file. The code-behind file provides code support for the markup. Together, these two files contribute to a new class definition that includes child views and property initialization. Within the XAML file, classes and properties are referenced with XML elements and attributes, and links between the markup and code are established.

    For more information, you can check documents: XAML and Get started with XAML.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.