Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Understanding the Structure of a MAUI Project | Introduction to Desktop Development with .NET
course content

Зміст курсу

Advanced C# with .NET

Understanding the Structure of a MAUI ProjectUnderstanding the Structure of a MAUI Project

Important Points

  • Every major component, such as a page, in a MAUI Application is represented by a XAML file and a C# file;
  • The XAML file typically contains some basic configuration and information regarding the visual layout of a component;
  • The C# file contains the code defining the functionality of that component;
  • Every component needs to be initialized in its constructor using the InitializeComponent(); function;
  • The App class represents the application. Here we can explicitly define some resources to be included in our application;
  • The AppShell class represents the application window. Here we can create a navigation bar that allows the users to navigate between different pages. The default page is the MainPage;
  • The MainPage class represents the main page of the application. MainPage.xaml is where we create the visual interface of our application. While MainPage.xaml.cs is where we define the functionality of that interface;
  • Every class representing a page is derived from the ContentPage class. We can have multiple pages in our application;
1. Which class does `App` derive from?
2. Which class does `AppShell` derive from?
3. Which of the following files contains the window title?
4. Which function is used for initializing a component in its class' constructor?

Which class does App derive from?

Виберіть правильну відповідь

Which class does AppShell derive from?

Виберіть правильну відповідь

Which of the following files contains the window title?

Виберіть правильну відповідь

Which function is used for initializing a component in its class' constructor?

Виберіть правильну відповідь

Все було зрозуміло?

Секція 1. Розділ 3
course content

Зміст курсу

Advanced C# with .NET

Understanding the Structure of a MAUI ProjectUnderstanding the Structure of a MAUI Project

Important Points

  • Every major component, such as a page, in a MAUI Application is represented by a XAML file and a C# file;
  • The XAML file typically contains some basic configuration and information regarding the visual layout of a component;
  • The C# file contains the code defining the functionality of that component;
  • Every component needs to be initialized in its constructor using the InitializeComponent(); function;
  • The App class represents the application. Here we can explicitly define some resources to be included in our application;
  • The AppShell class represents the application window. Here we can create a navigation bar that allows the users to navigate between different pages. The default page is the MainPage;
  • The MainPage class represents the main page of the application. MainPage.xaml is where we create the visual interface of our application. While MainPage.xaml.cs is where we define the functionality of that interface;
  • Every class representing a page is derived from the ContentPage class. We can have multiple pages in our application;
1. Which class does `App` derive from?
2. Which class does `AppShell` derive from?
3. Which of the following files contains the window title?
4. Which function is used for initializing a component in its class' constructor?

Which class does App derive from?

Виберіть правильну відповідь

Which class does AppShell derive from?

Виберіть правильну відповідь

Which of the following files contains the window title?

Виберіть правильну відповідь

Which function is used for initializing a component in its class' constructor?

Виберіть правильну відповідь

Все було зрозуміло?

Секція 1. Розділ 3
some-alt