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 9 .NET MAUI Android Blazor C# Code Desktop Developer Getting Started Hybrid iOS macOS Mobile NuGet Toolkit Visual Studio VS Code What's New Windows Xamarin Xamarin.Forms XAML

Exploring the New RatingView Control in .NET MAUI Community Toolkit v11.2

Yesterday marked the release of v11.2 of the .NET MAUI Community Toolkit, which is based on .NET MAUI 9 SR5 (v9.0.50).

Though it serves as the extended arm of .NET MAUI app development, newcomers will discover this officially supported toolkit to be of immense value.

It provides a thorough array of essential components, including Alerts, Behaviors, Converters, Extensions, Layouts, and Views, which are vital for creating practical, real-world applications.

The Rating control is one of the most used controls while developing feedback pages. Requesting users to rate their quality of service, product reviews, questionnaires, surveys, KPIs, appraisals, feedback forms, user interactions like likes and dislikes, etc. Later, this data can be used to search, suggest, list, and improve products/services.

Categories
.NET .NET 8 .NET 9 .NET MAUI Android Behaviors Blazor C# Code Commands Desktop Developer General Hybrid iOS Made Easy Mobile MVVM Toolkit Windows Xamarin Xamarin.Forms

Handling UI Events with MVVM Commands in .NET MAUI using EventToCommandBehavior

This article is part of the MVVM – Made Easy series, focusing on handling UI events with ViewModel commands.

This series comprises articles that provide insights into working with the MVVM design pattern, to make it a delightful experience. All the articles in this series can be accessed from here – MVVM – Made Easy

The View serves as the user interface, while the ViewModel is composed of Properties and Commands that encapsulate the underlying logic. This architectural layering offers the distinct advantage of enabling independent development and testing of both components. Data Binding functions as the cohesive element that interlinks these two layers.

An event represents a significant mechanism for notifying state changes, such as a button click, to other components that have a vested interest in the occurrence.

The receiver component is capable of responding to the event by subscribing to it through a method whose signature corresponds with the delegate of the event ensuring type safety. And that method is generally referred to as an event handler.

However, the challenge emerges during the testing of the ViewModel, as the event is closely intertwined with the View. Business logic can’t be independently tested.