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 8 .NET 9 .NET MAUI Android Blazor C# Desktop Developer Getting Started Hybrid iOS Mobile MVVM Windows XAML

XAML Basics: Building UI with .NET MAUI and More

Starting a new series entitled XAML for Beginners elucidates the concept of declarative markup to define UI in .NET applications. All articles within this series can be accessed from here.

The second installment of this series is now available to read here.

XAML is an acronym that stands for eXtensible Application Markup Language. It was first introduced in 2006, accompanying the initial release of Windows Presentation Foundation (WPF) alongside .NET 3.0.

The principal objective of this methodology is to segregate the UI design from the program logic. This separation allows the design team to focus solely on the UI, while the program logic can be developed and evaluated independently. Consequently, these components can be integrated into a unified system.

The MVVM design pattern is an exemplary framework for accomplishing this. However, XAML also supports the code-behind approach.

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.

Categories
.NET .NET 8 .NET 9 .NET MAUI Android Blazor C# Code Desktop Developer General Getting Started Hybrid iOS macOS Made Easy MVVM NuGet Preview Toolkit Visual Studio VS Code What's New Windows Xamarin Xamarin.Forms

MVVM Toolkit v8.4: Custom Access Modifiers for Partial Properties – How To

This article is part of the MVVM – Made Easy series, with a focus on the initial preview release of v8.4 of the CommunityToolkit.Mvvm (aka Microsoft MVVM Toolkit) NuGet package, which includes support for Partial Properties.

Update as of Dec 2024: The v8.4 stable release is now available. For further details, please refer to this blog post.

Here are the links to other articles in this series.

Support for Partial Properties is one of most sought after features in the MVVM toolkit as it allows to define custom access modifier for property accessors and makes code more readable. The need for an analyzer to track the usage of a field instead of a (generated) property is no longer necessary.

Categories
.NET .NET 8 .NET 9 .NET MAUI Android Blazor C# Desktop Developer Events F# General Hybrid iOS macOS Mobile Standup Video Visual Studio VS Code Web What's New Windows Xamarin Xamarin.Forms

Join the .NET MAUI Community Standup This November

This November, join David, Rachel, and a special guest (probably Stephan Arnas) as they discuss the latest developments in the realm of .NET MAUI during the monthly community standup preceding .NET Conf 2024 next week.

Consult the article titled Getting Started with Syncfusion’s .NET MAUI Toolkit to start using this free and open-source toolkit, with support within the All-in-One MAUI Templates for the initial setup.

The exciting news is that the second set of 5 controls is nearing its release.

  • Button
  • Bottom Sheet
  • Calendar
  • Numeric Entry
  • Numeric Up Down

Remember to join live on Thu, Nov 7 at 18:00 UTCClick the link to access the timing in your local or preferred time zone. Note, that it’s an hour behind its usual schedule.

Update: The community links for this month’s standup will be updated here.

Happy coding. Stay connected as we continue to learn and share the experiences from this exciting journey of being a .NET developer.

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

Exploring .NET MAUI 9: HybridWebView Features

.NET MAUI 9 is the next major version of the cross-platform application UI framework. An article detailing the significant features of this version has already been published and can be accessed here.

This release features two prominent enhancements:

The TitleBar support for MacCatalyst is in progress. Track here.

This article will delve into the details of HybridWebView.

Categories
.NET .NET 8 .NET 9 .NET MAUI Android Automation Blazor C# Desktop Developer General Getting Started Hybrid iOS macOS Mobile Preview Templates VS Code What's New Windows Xamarin Xamarin.Forms

Elevating .NET MAUI Item Templates: Simplified Namespace Resolution in Latest Release

Back in February, an article was published on the efficient utilization of Item Templates through the use of script automation. The article, titled .NET MAUI – Item Templates – Made Easy on CLI and VS Code, provides a detailed focus on this topic.

That article addressed two issues:

  • Better namespace resolution
  • Do more with fewer keystrokes

Now, the namespace resolution issue has been partially supported within the .NET SDK, eliminating the requirement for additional script files. A PR was submitted to the .NET Templating source repository, underwent review, and was subsequently merged into the main branch. This enhancement was then included in the release of .NET 9 Preview 6.

Categories
.NET .NET 8 .NET 9 .NET MAUI Android Automation Blazor C# Desktop Developer DevOps Extensions General Getting Started Hybrid iOS Mobile NuGet Templates Visual Studio VS Code Web What's New Windows Xamarin Xamarin.Forms

.NET MAUI All-in-One Templates Pack v5.6: NuGet CPM and Nightly Builds Support

Firstly, .NET MAUI 9 Preview 5 has just been released. The changelog can be found here. Notably, a new Blazor Hybrid Web template has been introduced in this version.

In short, this new template abstracts the Razor components into a distinct Razor Class Library (RCL). Furthermore, it provides the ability to create Blazor Web projects within the same solution and refers to the shared RCL.

The concept of abstracting the Razor components is already facilitated by the Hybrid project templates within the All-in-One template pack.

dotnet new mauiapp -o MyApp -dp Hybrid -rcl

Will review the modifications and cover them in a distinct article.

Categories
.NET .NET 8 .NET 9 .NET MAUI Android Blazor C# Desktop Developer Extensions General Getting Started Hybrid iOS macOS Migration Mobile Templates Visual Studio VS Code Web What's New Windows Xamarin Xamarin.Forms

Enhancements in .NET MAUI All-in-One Project Templates

As we all know .NET MAUI is an evolution of Xamarin.Forms. The underlying architecture transitioned from Renderers to Handlers. The project structure is unified. But for the projects that are getting migrated and developers coming from Xamarin.Forms background would feel at home with the classic multi-project solution structure.

To effectively support this, the All-in-One project templates introduced an option to abstract the Shared components as a separate .NET MAUI Class Library.

Categories
.NET .NET 8 .NET 9 .NET MAUI Android Blazor C# Code Desktop Developer Embedding iOS macOS Maps Mobile Quick Fix Toolkit Web Windows Windows 11 WinUI 3 Xamarin Xamarin.Forms

.NET MAUI Community Toolkit Maps in WinUI 3 App

This article provides a comprehensive guide on leveraging the Maps feature from the .NET MAUI Community Toolkit in a WinUI 3 App through the robust Embedding feature.

The CommunityToolkit.Maui.Maps NuGet package provides access to Bing Maps through a WebView on Windows. The Handler definitions for the Windows platform for the .NET MAUI Maps feature are hosted in this package.

To ensure the Maps feature functions correctly on the native WinUI 3 App, it is imperative to slightly adjust the feature initialization in the MAUI pipeline.