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

Getting Started with Syncfusion’s .NET MAUI Toolkit

Yesterday, Syncfusion, a prominent vendor of software components, announced its dedication to contributing to .NET MAUI and the release of the initial set of free and open-source controls for .NET MAUI, which is now available as a NuGet package titled Syncfusion.Maui.Toolkit.

Microsoft has gladly welcomed Syncfusion’s open-source contributions, a gesture seen as a positive step for .NET MAUI confirming the ongoing commitment to the cross-platform framework.

Syncfusion is utilizing its proficiency in developing software components to collaborate with Microsoft, with the objective of significantly enhancing .NET MAUI. Their team is already making a noteworthy impact.

The initial release of the NuGet package includes 14 UI controls categorized broadly under Data Visualization (Charts), Navigation, Layout, Buttons, Notification, and Miscellaneous as described below.

The controls are not only free to use but also open-source as code is hosted on GitHub.

Useful Links:

Controls Suite:

CategoryControlDescription
Data VisualizationCartesian ChartsVersatile data representation using line, bar, and area charts.
Circular ChartsDisplay proportions and comparisons using pie and doughnut charts.
Pyramid ChartsVisualize hierarchical data, perfect for business and analytics applications.
Funnel ChartsRepresent processes and data flow, often used in sales and analytics.
Polar ChartsShowcase categories in a circular format, ideal for unordered data.
NavigationNavigation DrawerSlide-in menu for navigation, positionable on any side of the app with customizable animations.
Tab ViewOrganize app content with customizable tabs, enabling easy navigation across sections.
LayoutCarouselSmooth, touch-enabled sliding galleries for showcasing images or featured content.
Text Input LayoutEnhances input fields with floating labels and validation, improving user interaction.
ButtonsChipsInteractive tags for filtering, labeling, or visual options, perfect for e-commerce or task management.
Segmented ControlQuickly switch between views or categories, ideal for apps with multiple layout options.
NotificationPull to RefreshAllows users to refresh live data by pulling down, ideal for real-time data syncing.
MiscellaneousEffects ViewAdd visual enhancements like shadows, blurs, or highlights to make UI elements stand out.
ShimmerIndicates loading content with customizable wave directions, great for data-heavy apps.

Package Install:

From CLI:

dotnet add package Syncfusion.Maui.Toolkit

In Project File:

1.0.1 is the latest version of the toolkit as of now.

<PackageReference Include="Syncfusion.Maui.Toolkit" Version="1.0.1" />

Initialization:

And then wire it up in the MAUI startup pipeline, in MauiProgram.cs, as shown below:

using Syncfusion.Maui.Toolkit.Hosting;

public static class MauiProgram
{
  public static MauiApp CreateMauiApp()
  {
    var builder = MauiApp.CreateBuilder();
    builder.UseMauiApp<App>()
           .ConfigureSyncfusionToolkit();
    // All other stuff
    return builder.Build();
  }
}

XAML Namespace:

<?xml version="1.0" encoding="UTF-8" ?>
<ContentPage
  x:Class="MyApp.Views.MainPage"
  xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
  xmlns:sft="http://schemas.syncfusion.com/maui/toolkit"
  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
  <sft:SfPullToRefresh />
</ContentPage>

New Project Template:

In a noteworthy advancement, Microsoft is working with Syncfusion to create a new project template that encompasses commonly employed features of mobile apps, including the MVVM pattern, SQLite database access, navigation, and view refresh, among others. This template is anticipated to be available with the GA release of .NET 9. Track it here.

Support in All-in-One MAUI Templates Pack:

Today’s release of the latest version of the All-in-One MAUI Templates pack now includes support for this new toolkit during project setup. This enhancement involves adding a reference to the NuGet package and its configuration within the MAUI startup pipeline, thereby removing the necessity for manual steps.

The updated .NET MAUI Templates Pack VS extension is now available for download.

A new parameter has been defined for this purpose, isft or include-syncfusion-toolkit. Supported across all three project formats: App, Library, and Shared Library.

To Update the Templates Pack:

dotnet new install VijayAnand.MauiTemplates

Project Creation:

On CLI:

dotnet new mauiapp -o MyApp -isft
dotnet new mauiclasslib -o MauiLib -isft
dotnet new sharedclasslib -o SharedLib -isft

From within Visual Studio:

As a selection option available within the Project Options UI.

Support for Syncfusion.Maui.Toolkit NuGet package in the All-in-One .NET MAUI Templates Pack
Support for Syncfusion.Maui.Toolkit NuGet package in the All-in-One .NET MAUI Templates Pack

May contributions keep pouring in, further enhancing .NET MAUI for the benefit of the overall ecosystem.

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

Discover more from Developer Thoughts

Subscribe now to keep reading and get access to the full archive.

Continue reading