Categories
.NET .NET 8 .NET 9 .NET MAUI .NET MAUI 9 Android Blazor C# Code Developer Getting Started Hybrid iOS macOS Mobile NuGet Toolkit Tools Web What's New Windows Xamarin Xamarin.Forms

Integrated App Hosting Builder Method for .NET MAUI Explained

VijayAnand.MauiToolkit is a toolkit that provides various types and methods to make working with .NET MAUI easier. It’s available as a NuGet package and can be installed using the command below.

dotnet add package VijayAnand.MauiToolkit

The latest addition is the Application, Window, and Page integrated app hosting builder extension method.

Introduction:

From .NET MAUI 9, you need to create your main window to run your app by overriding the CreateWindow() method. Instead of setting the Application’s MainPage, pass the page as a parameter to the constructor of the Window type. Alternatively, set its Page property. This topic has already been covered in detail in an earlier article.

Since the app startup configuration is done in one location, MauiProgram.cs, it’s best to set the main Window while configuring the Application in the UseMauiApp() method. Thus the inherited App type acts as a container for global resources. It also handles app events like Start, Sleep, and Resume.

Categories
.NET .NET 8 .NET 9 .NET MAUI Android Blazor C# Code Desktop Developer Getting Started Hybrid iOS macOS Mobile MVVM Windows Xamarin Xamarin.Forms XAML

XAML Basics: Building UI with .NET MAUI and More – Part 2

This article represents the second installment of the XAML for Beginners series, which elucidates the concept of declarative markup in the context of defining UI in .NET applications. All articles within this series are accessible from here.

The initial article focused mainly on introducing XAML and its building blocks.

In this article, the focus will be on the following:

  • Attached Properties
  • Generics
  • Passing Arguments
Categories
.NET .NET 9 .NET MAUI C# Code Desktop Developer Getting Started Hybrid macOS MVVM What's New Windows Xamarin Xamarin.Forms

What’s New in .NET MAUI 9 – Window TitleBar

Window TitleBar is one of the two prominent enhancements in .NET MAUI 9, the recently released major version of the cross-platform App UI framework.

The other new feature is HybridWebView, consult this article titled Exploring .NET MAUI 9 – HybridWebView to delve into the details of this new control.

An article that comprehensively outlines the significant features of this version has already been published and is accessible here.

The Window type defines two properties – Page and TitleBar.

Page:

In .NET MAUI 9, the MainPage property of the Application class is now obsolete, replaced by the Page property of the Window class to accommodate this new TitleBar feature for the Desktop (Windows and Mac Catalyst). To know more about this MainPage change, refer to this article.

Categories
.NET .NET 8 .NET 9 .NET MAUI Android Blazor C# Code Desktop Developer General Hybrid iOS macOS Mobile Web What's New Windows Xamarin Xamarin.Forms

Transitioning from Application’s MainPage to Window’s Page in .NET MAUI 9

This article analyzes a significant change introduced in .NET MAUI 9, specifically the deprecation of the Application’s MainPage property, which has been replaced by the Window’s Page property.

An article has already been published detailing the comprehensive features of .NET MAUI 9.

The MainPage has existed since the inception of Xamarin.Forms, at which time it functioned as a single-window UI framework.

Nevertheless, the design of .NET MAUI incorporates the concept of a Window to effectively support Desktop form factors, including WinUI and Mac Catalyst.