Site icon 지락문화예술공작단

Announcing Windows Community Toolkit v7.0

Announcing Windows Community Toolkit v7.0

After many months of invigorating the Windows Community Toolkit with a multitude of improvements and features; we are happy to announce version 7.0 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 10. 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. 

This new update includes a whole new .NET Standard MVVM library, easier to use Toast Notification helpers for both .NET and UWP, a completely revamped composition Animation system for C# & XAML, new controls, and more!!! 

This is one of the largest releases of the Toolkit ever as we embarked to optimize and streamline the Toolkit for the future. However, it also contains many breaking changes to pay attention to both around its underlying structure and code contracts. Please be sure to read our release notes here, some high-level overviews are provided below. 

There should be something for everyone in this release as it includes a wide variety of features; we hope you will enjoy them for building .NET and UWP apps on Windows 10. 

See more details of these changes and new features below. 

New Package Structure & Breaking Changes 🚨 

We have refactored many packages within the Toolkit. This was to help reduce pulling in extra dependencies for the whole package when only a small number of components required them. This has allowed us to reduce the application size footprint impact of the Toolkit in common scenarios by 80-90% 

If you are new to the Toolkit or creating a new application, you can skip this section and jump to our new features below!  

The refactoring we have done has affected the Animations and Controls packages the most. Highlights of the most impactful changes are below, but see our release notes for full details.

As part of this journey, we have also improved our processes within the Toolkit itself adding more continuous integration testing to our pipeline, and we have a Wiki with details on how to get started contributing to the Toolkit! 

Introducing the MVVM Toolkit for .NET – 🏆 Sergio Pedri 

The Microsoft.Toolkit.Mvvm package is a modern, fast, and modular MVVM library. It is built around the following principles: 

The package targets .NET Standard so it can be used on any app platform: UWP, WPF, Xamarin, Uno Platform, and more; and on any runtime: .NET Native, .NET Core, .NET Framework, or Mono. It runs on all of them and provides a common API surface for all cases.  

This makes it much easier to abstract the base Model and ViewModel logic from the application later, especially for projects which may want to target multiple UI frameworks. 

This new library has been a nearly year-long community effort driven by Sergio Pedri and inspired by the work done by Laurent Bugnion’s MVVM Light. The Windows Template Studio team is also bringing support for the library to their suite of design patterns. We have worked with them, Microsoft MVPs (Matt Lacey, James Croft, Nick Randolph, Diederik Krols, and Martin Zikmund), and our community to develop, test, and validate core scenarios of the library before its release here.  

You can find samples and more about the MVVM Toolkit here. 

Improved Notification Support for Win32 and .NET 5 

Unpackaged Win32 C# apps can now effortlessly use toast notifications, no Start menu shortcut required! Just call the following API, and that is literally it! 

new ToastContentBuilder() 
    .AddText("Hello toast!") 
    .Show();

Plus, this same simplified API works identically for UWP and packaged MSIX C# apps too! No more lengthy ToastNotificationManager.CreateToastNotifier().Show(content.GetXml()).To try this out, see the doc page here. You can see us add notifications end-to-end to a WPF app in less than 2 minutes in this video! 

Explicit Animation Helpers – 🏆 Sergio Pedri 

As called out above, we have revamped our Animations package in the toolkit. Beyond that though, we have added a new ‘Explicit Animation’ system. If you have used our Implicit Animation helpers in the past, you will love these! 

Not only do we have a powerful new AnimationBuilder class to help you create gorgeous and powerful composition animations within C#, but we have also exposed it to XAML as well. Look at what you can do below now without code-behind! 

Now all your composition animations can be done with a nice C# API or in XAML just like our Implicit Animations Helpers that have been so widely loved in the past. Enjoy, and share your creations with #WindowsCommunityToolkit on Twitter. 

TabbedCommandBar – 🏆 Yoshi Askharoun 

The TabbedCommandBar is an app level navigation interface that delivers a flexible space to control commanding within your app. It provides a familiar experience found in many productivity apps and allows an app developer to group similar commands together. It also provides the ability to add contextual tabs for displaying options which may be only useful when a user is making specific changes within the app.  

Improved ColorPicker – 🏆 Robert Looyengoed 

After discussions on the WinUI GitHub about revitalizing the ColorPicker control, the community stepped forward to envision a new experience for picking Colors. Robert developed a new version of ColorPicker for everyone to use and try. We hope to provide feedback and improvements based on this new experience to the platform team when they next refresh ColorPicker in the future. 

SwitchPresenter – 🏆 Michael Hawker 

The SwitchPresenter is a new way to layout and organize your XAML. It provides the equivalent of a switch statement from C# in XAML! It can make it easier to group elements together that are related to a scenario instead of getting them jumbled together with many Visibility bindings. Or you can use it to completely swap out a section of UI easily based on some other factor. Check out our example in our docs. 

On The Horizon 

Project Reunion 0.5 Preview 

As you hopefully know, we have been shipping previews of the Toolkit that work for WinUI 3 alongside their preview releases. We have released a preview of the toolkit which works for Desktop apps with .NET on the Project Reunion 0.5 Preview released last week. Find out more details on how to try this out here 

Future NuGet Package Identity Changes 

In a few weeks, we will release an updated version of our WinUI 3 based controls to NuGet for Project Reunion 0.5. As part of this change, we’ll also be starting to use a new package identity root of CommunityToolkit.* for our packages. Our existing UWP packages will remain as Microsoft.Toolkit.Uwp.*; however, our new packages for WinUI will be under CommunityToolkit.WinUI.* 

Our plan will be to deprecate the UWP packages at a time in the future when we feel our community as a whole can migrate to WinUI 3 when it supports the features our existing UWP community knows and loves today. Until that time, we will plan to support our existing UWP developers first via our existing packages built on top of UWP + WinUI 2.x and ship parallel versions for WinUI 3. Therefore, each next toolkit release for UWP (e.g. 7.1) will have a corresponding version 7.1 which contains the same feature set but for WinUI 3 (outside of anything not currently supportable on WinUI 3 yet). 

Even More! 

Be sure to also checkout the new Win2D Path Mini Language Parser by 🏆 Ratish Philip🏆 Sergio Pedri’s HighPerformance package updates, and the Lottie Viewer App improvements.

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! 

Get started today! 🎉 

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 new Wiki! To follow the conversation on Twitter, use the #WindowsCommunityToolkit hashtag or join us in our UWP Community Discord channel!

Happy coding! 
Source: Announcing Windows Community Toolkit v7.0

Exit mobile version