Share this article

Latest news

With KB5043178 to Release Preview Channel, Microsoft advises Windows 11 users to plug in when the battery is low

Copilot in Outlook will generate personalized themes for you to customize the app

Microsoft will raise the price of its 365 Suite to include AI capabilities

Death Stranding Director’s Cut is now Xbox X|S at a huge discount

Outlook will let users create custom account icons so they can tell their accounts apart easier

What’s new with the latest release of .NET Community Toolkit

2 min. read

Published onApril 12, 2022

published onApril 12, 2022

Share this article

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

Preview 3 of version 8 of the .NET Community Toolkit just dropped and it comes packed with a ton of goodies. For those unfamiliar with what this is, it a set of APIs and helpers to assist .NET developers with a large number common tasks regardless of the UI platform they chose to build with. Today we are going to dig into a couple of new features headed our way, let’s get to it.

Microsoft MVVM Toolkit

This new MVVM Toolkit version expands on the source generator functionality released in previous releases. These APIs are intended to significantly simplify the necessary boilerplate when dealing with MVVM, with help ranging from observable properties to commands and more. Here are some of the features.

The[ICommand]attribute now contains a new property that can be used to direct the source generator to generate a cancel command in addition to the original command. This cancel command can be used to stop an asynchronous command from running. Check out the example implementation below.

Revamped observable grouped collections

These APIs are especially handy for working with grouped items, and they now feature improvements to substantially simplify basic tasks such as adding an item in the correct location within a group. Starting with this release all the observable grouped collection types from the CommunityToolkit.Common moved to to CommunityToolkit.Mvvm. Sergio Pedri Software Engineer II at Microsoft shows us a sample of this in the GIF below.

This was just a glimpse at the changes coming our way with the latest Preview release of the Community Toolkit. As always be sure to watch out for breaking changes, as some are in fact included.

For more details on what we just discussed here plus more information on other improvements, please visit theoriginal blog post hereor check out the official Community Toolkit’sGithub repositoryfor a more comprehensive view of all new features and changes.

Radu Tyrsina

Radu Tyrsina has been a Windows fan ever since he got his first PC, a Pentium III (a monster at that time).

For most of the kids of his age, the Internet was an amazing way to play and communicate with others, but he was deeply impressed by the flow of information and how easily you can find anything on the web.

Prior to founding Windows Report, this particular curiosity about digital content enabled him to grow a number of sites that helped hundreds of millions reach faster the answer they’re looking for.

User forum

0 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Radu Tyrsina