Announcing Windows Community Toolkit v7.1The Windows Community Toolkit has another update filled with improvements and features! We’re thrilled to announce version 7.1 is available today! Made possible again with the support and contributions of our developer community. If you are new to the Toolkit, the Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks for building UWP and .NET apps for Windows. The toolkit is part of the .NET Foundation. You can download our Sample App playground to discover and try Toolkit components before getting started on a project.
Microsoft Identity Authentication Helpers, OneDrive Storage, and Microsoft Graph Controls - Shane WeaverNew and improved for 7.1, our Microsoft Graph offering is moving out of its prior preview phase and has been overhauled and streamlined with new helpers and providers for authenticating with Microsoft Identity and calling Graph APIs. We received a lot of great feedback from the community that we hope will help devs hit the ground running, authenticating users, and calling Microsoft Graph APIs!
Authentication Providers In this release we are introducing a variety of new authentication packages:
|CommunityToolkit.Authentication||Core constructs for supporting authentication aware applications.|
|CommunityToolkit.Authentication.Msal||Authentication provider based on the official Microsoft Authentication Library (MSAL) for .NET SDK.|
|CommunityToolkit.Authentication.Uwp||Authentication provider based on the native account management APIs in Windows.|
Graph Powered Controls and OneDrive HelpersNext, we are re-introducing our Graph controls and helpers in the form of two new packages:
|CommunityToolkit.Graph||Extensions and helpers for making adhoc Graph requests, leveraging the official Graph SDK for .NET.|
|CommunityToolkit.Graph.Uwp||Windows specific helpers and controls for facilitating authentication flow and visualizing Graph data.|
- Extensions – Call GetClient() or GetBetaClient() on any IProvider instance to get access to a pre-configured GraphServiceClient on demand.
- OneDriveStorageHelper and UserExtensionStorageHelper – New helpers for storing settings and file data in Graph based storage locations, such as OneDrive or open extensions on the Graph User object.
- Controls – LoginButton, PeoplePicker, and PersonView (GraphPresenter is still experimental.)
- ProviderStateTrigger – A StateTrigger for detecting when the global authentication provider has been signed in.
- ElementExtensions.IsVisibleWhen – Extension on FrameworkElement for declaring element visibility behavior in response to authentication changes.
Attached Shadows - Chris Blackman and Michael HawkerMove over DropShadowPanel and hello Attached Shadows! Attached shadows make it even easier to add this great depth effect to your app, now without having to modify your layout! They’re even used in the Microsoft Store App!
AttachedCardShadow using Win2DThe AttachedCardShadow is a rectangular-based shadow (which supports rounded corners) that can be applied directly to an element without the need for any other configuration. It should be your new go-to shadow option if you don’t mind the Win2D dependency it requires.
AttachedDropShadow using CompositionThe AttachedDropShadow supports masked shadows for transparent images, shapes, and text. It uses the composition layer, so it’ll work with any UWP app. It has inherited the implementation of DropShadowPanel, but it works a bit differently. Be sure to check out our documentation and samples to learn more.
RichSuggestBox - Tung Huynh
WinUI 2.7 and other Improvements!We’ve updated to base on control packages on the new WinUI 2.6 and 2.7 update which also includes updated styles. We’ll continue to update our control styles with the new design guidance over time.
- Updated dependency to WinUI 2.6 by Rosario Pulella and Darren Batchelor
- Updated ColorPicker by Robert Looyengoed and TabbedCommandBar by Yoshi Askharoun to use WinUI controls as base.
- New MetadataControl by Vincent Gromfeld
- New ConstrainedBox Control by Chris Blackman and </> Michael Hawker (also used in the Microsoft Store App!)
- SmoothScrollIntoView extension by Vijay Nirmal
- AutoSelectBehavior by Julien Brianceau
- PreviousVersionInstalled by Emiliano Magliocca
- ListDetailsView uses Two-Pane View by Fabian Sauter
- ControlSizeTrigger Visual State Trigger by Daniel Paulino
- KeyDownTriggerBehavior by Sébastien Lachance
On The Horizon
MVVM Source Generator [Preview] - Sergio PedriThe MVVM Toolkit now has support for source generators (in preview). This makes the library more flexible, easier to use, and even more efficient! Following is a small sample of some source generator attributes in action. On the left-hand side is the original hand-written example using the MVVM Toolkit, as you would today. On the right-hand side is how you can use the new attributes to automatically generate the exact same code!
- The [ObservableProperty] attribute creates a super compact way of creating an observable property from just a field and annotation. [AlsoNotifyChangeFor] can also be used to raise a change notification for another dependent property.
- The [ICommand] attribute will let you annotate methods in a ViewModel and generate all the corresponding command properties. This includes support for generic commands and asynchronous commands: just annotate an async method returning a Task!
- You can also annotate a class with [INotifyPropertyChanged], [ObservableObject], [ObservableRecipient], or [ObservableValidator] to inject all the boilerplate code needed to use those MVVM helpers while still inheriting from other base classes! You can also use this to mix together inheriting from ObservableRecipient and then add the [ObservableValidator] attribute to combine all APIs from both classes.
Introducing Toolkit Labs As the Windows Community Toolkit has grown, we’ve raised the bar on the quality of our code and the process we use for vetting new features being introduced. This helps our community know they’re getting quality items in each of our releases, but it can slow down the pace at which we can innovate. Innovation has been the life of the Toolkit. Rapidly prototyping ideas, gathering community feedback, and shipping things folks need have been instrumental to how the Toolkit works. For this reason, we’re introducing “Community Toolkit Labs”. Labs will be a place where we can incubate and work on new features in a safe space outside our normal code base and ship cycles. It’ll be easier to get started working on code and collaborating with others before having to worry about the docs, samples, and tests required to ship a fully fleshed-out idea and feature within the Toolkit. In the future, we plan to have a centralized Labs repository for smaller features and controls to be proposed, incubated, and worked in with the community. Be on the lookout for more info about this new space in the future. We will have a dedicated NuGet feed for Toolkit Labs in our public DevOps package feed. You can find out more about these types of Preview Feeds on our Wiki. We may also have larger ideas that have their own repository underneath the Labs banner, like the first ones we’re introducing today…
Intelligent APIs - Amrutha Srinivasan
Gaze Controls - Harish KulkarniThese new Gaze Controls can empower users whose primary form of input is to use their eyes. These controls have been designed for Gaze interaction first above other forms of input. They include a FilePicker, a Keyboard, and a Scrollbar. Find out more or contribute to their dedicated repo here.
Windows App SDK Previews (formally Project Reunion)As you hopefully know, we have been shipping versions of the Toolkit that work for WinUI 3 alongside their releases as part of the Windows App SDK. We have released a version of the toolkit which works for Desktop apps with .NET for the Windows App SDK 0.8.4 release. Find out more details on how to try this out here, as a reminder these WinUI 3 based packages use CommunityToolkit.WinUI.* as the root vs. Microsoft.Toolkit.UWP. We’ll have more info about the upcoming 1.0 release support in the future and plan to ship an update that includes our 7.1 changes as well.
Get started today! There’s a ton of fixes, other helpers, and improvements across the board from our community this release, so be sure to visit our release notes for all the details! As a reminder, you can get started by following our docs.microsoft.com tutorial or preview the latest features by installing the Windows Community Toolkit Sample App from the Microsoft Store (it links to each doc page too). If you would like to contribute, please join us on GitHub and checkout our Wiki! To follow the conversation on Twitter, use the #CommunityToolkit hashtag or join us in our UWP Community Discord channel! Happy coding! </>