News

Windows Community Toolkit 7.1: MVVM Source Generators, Identity Authentication, ML APIs

A bevy of new features and enhancements debut in a preview of the upcoming Windows Community Toolkit 7.1 release, a collection of helpers, extensions and custom controls that simplify and demonstrate common developer tasks building UWP and .NET apps for Windows 10.

The kit helps developers build apps for any Windows 10 device, including PC, Mobile, Xbox, IoT and HoloLens, with various functionalities demonstrated in a sample app:

Windows Community Toolkit Sample App
[Click on image for larger view.] Windows Community Toolkit Sample App

Part of the .NET Foundation, the kit is now developed on GitHub as part of a broader Community Toolkit organization that has grown to encompass these offerings:

  • Windows Community Toolkit
  • Graph Community Toolkit
  • MVVM Toolkit
  • MAUI Community Toolkit

Also, a new .NET Community Toolkit is planned.

In the new WCT v7.1 preview, the MVVM library component now supports source generators, a C# compiler feature that lets C# developers inspect user code as it is being compiled and generates new C# source files on the fly that are added to the user's compilation.

This graphic shows original hand-written example code written using the toolkit as customary, while the right-hand side shows how new source generator attributes can be used to automatically generate the same exact code:

MVVM Source Generators in Action
[Click on image for larger view.] MVVM Source Generators in Action (source: Microsoft).

Microsoft said source generators make the library more flexible, easier to use and more efficient, alleviating the need to write extra boiler-plate code.

The Graph offering, meanwhile, gets new helpers and providers for authenticating with Microsoft Identity with the introduction of a variety of new authentication packages. Functionality for calling Microsoft Graph APIs has also been improved, and Graph controls and helpers have been re-introduced in new packages.

Also new are new Intelligent APIs designed to make machine learning easier for developers who need to leverage the technology without extensive expertise.

"By just importing a NuGet package and calling a function, we want developers to be able to build intelligent app experiences without needing to deal with the complexities of creating and using machine learning models on Windows," Microsoft said.

We are currently experimenting with this concept by wrapping two existing state-of-the-art models into NuGet packages. They enable the developer to add image classification and object detection capabilities quickly and easily into their projects with a single function call."

Community Toolkit Labs has also been introduced, following the pattern of other organizations that foster innovation by providing a space for developers to work on projects -- incubating and working on new features -- in a safe space outside of the normal workflow. It lets them work and collaborate on innovative coding without having to worry about documentation, samples, testing and so on.

The team will create a central repository for smaller features and controls to be proposed, incubated and worked on with the community, with a dedicated NuGet feed for Toolkit Labs in the organization's public DevOps package feed.

More information on all of the above can be found in preview release notes and the project wiki.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Microsoft Revamps Fledgling AutoGen Framework for Agentic AI

    Only at v0.4, Microsoft's AutoGen framework for agentic AI -- the hottest new trend in AI development -- has already undergone a complete revamp, going to an asynchronous, event-driven architecture.

  • IDE Irony: Coding Errors Cause 'Critical' Vulnerability in Visual Studio

    In a larger-than-normal Patch Tuesday, Microsoft warned of a "critical" vulnerability in Visual Studio that should be fixed immediately if automatic patching isn't enabled, ironically caused by coding errors.

  • Building Blazor Applications

    A trio of Blazor experts will conduct a full-day workshop for devs to learn everything about the tech a a March developer conference in Las Vegas keynoted by Microsoft execs and featuring many Microsoft devs.

  • Gradient Boosting Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the gradient boosting regression technique, where the goal is to predict a single numeric value. Compared to existing library implementations of gradient boosting regression, a from-scratch implementation allows much easier customization and integration with other .NET systems.

  • Microsoft Execs to Tackle AI and Cloud in Dev Conference Keynotes

    AI unsurprisingly is all over keynotes that Microsoft execs will helm to kick off the Visual Studio Live! developer conference in Las Vegas, March 10-14, which the company described as "a must-attend event."

Subscribe on YouTube