Friday, June 3, 2022
HomeOperating SystemWhat’s New in Home windows App SDK 1.1

What’s New in Home windows App SDK 1.1


That can assist you construct native, participating, and trendy Home windows purposes, we’ve simply launched the 1.1 model of the Home windows App SDK. Constructing off of the 1.0 launch in November 2021, we’re excited to carry a number of new options and capabilities to the Home windows App SDK whereas rising its stability & efficiency.

The Home windows App SDK is the start line for constructing and delivery Home windows desktop apps (spanning C++ and .NET) with WinUI 3 controls and WebView2 for modernized UI growth. Hold updated with new function updates by collaborating within the GitHub repo and following the product roadmap.

Get Began with Home windows App SDK

To begin utilizing Home windows App SDK, see Get began with Home windows App SDK to arrange your growth atmosphere and study extra in regards to the elements included on this launch. If you wish to leap proper in with constructing your first WinUI 3 desktop app, begin with our tutorial or watch our Be taught Stay session as a part of //Construct 2022.

Consumer expertise

Alongside quite a few stability enhancements, Home windows App SDK 1.1 consists of a number of new and up to date options throughout its part areas that you may reap the benefits of in your purposes to thrill your customers.

WinUI 3

WinUI 3 purposes are actually in a position to make use of Mica & Background Acrylic supplies. Mica is an opaque, mode-aware materials new to Home windows 11 that includes the consumer’s background coloration to thrill customers and create visible hierarchy. To use these supplies to the backdrop of your utility try the brand new SystemBackdrop instance within the WinUI 3 Gallery. The WinUI 3 Gallery has been up to date to incorporate a number of new controls & samples alongside a visible refresh to showcase the Home windows 11 design language.

Notifications

MSIX-packaged, sparse-packaged, and unpackaged apps can now ship Home windows app notifications (also called toast notifications) and push notifications to tell customers when they don’t seem to be presently utilizing the app. This implies you possibly can ship app notifications domestically or from your personal cloud service. You too can ship uncooked notifications from your personal cloud service to ship new updates to your app in a power-efficient and reliable method. Take a look at our notification UX steerage for greatest practices round designing helpful, productive, and interesting notifications.

Elevation

WinAppSDK 1.1 removes constraints from 1.0 that prevented operating an app as an administrator. Improvement, administration, and system administration instruments can now leverage the total energy of Home windows App SDK.  For full assist, be certain that your goal gadgets have the most recent updates for Home windows 11 and Window 10 (Could 2022 servicing updates). Help for Home windows 10 LTSC 2019 is coming in a future servicing replace.

C# Efficiency Enhancements

C# apps will see considerably improved efficiency in many various situations by way of updates within the WinRT interop layer. In a easy Hiya World WinUI 3 app, you possibly can count on to see startup occasions improved by ~9% in comparison with our earlier WinAppSDK 1.0 launch.  One other frequent state of affairs the place enhancements might be seen is with dependency properties in WinUI 3 apps.

Windowing APIs

Windowing APIs now can help you management the relative z-order of your home windows. This can be a WinRT model of the SetWindowPos’s hWndInsertAfter performance. Every AppWindow represents a top-level window that you may transfer above or under different top-level home windows. Samples are being written for instance the completely different situations for manipulating the relative z-order amongst your app’s home windows.

In customized drawn title bars, you are actually in a position to simply create a tall titlebar (i.e., taller system caption controls and drag area). This permits for a extra contact pleasant consumer expertise in your app while offering extra room for interactive content material within the title bar similar to a search field or individual image. The title bar customization documentation gives extra particulars about how and when to implement a taller title bar.

One other helpful function launched on this model of Home windows App SDK is the flexibility to vary the scale of your window based mostly on the consumer space dimension. This lets you set the scale of the consumer space, after which resize the window’s non-client space to match this. In different phrases, eradicating the necessity to calculate the overhead that the non-client space has to get a particular consumer dimension.

Along with these new APIs, there are additionally modifications to the default Presenter utilized to an AppWindow when utilizing GetFromWindowId() to pay money for it. The change in conduct is non-breaking in that you’ll nonetheless have a default Presenter of the identical kind as earlier than (OverlappedPresenter), but it surely is not going to block any window fashion modifications coming from exterior of the AppWindow/OverlappedPresenter API floor.

Developer expertise

WinAppSDK 1.1 brings a number of options that can make your expertise simpler & less complicated when constructing desktop Home windows apps.

App Lifecycle & Restart

With Home windows App SDK 1.1, you are actually in a position to programmatically restart your utility and set restoration choices after app termination as a consequence of occasions similar to an app replace, app crash, or cling. This implies you possibly can recuperate app state after sudden restart and your customers are instantly again to interacting and interesting together with your utility. These capabilities can be found as a part of the brand new AppInstance.Restart() API within the AppLifecycle class. This can be a lifted and synchronous model of the UWP RequestRestartAsync()API now out there for each packaged or unpackaged desktop purposes.  Take a look at the Restart API docs on GitHub for utilization & reference data.

Template Studio

Template Studio for WinUI (C#) is now out there! Template Studio is an extension for Visible Studio 2022 that accelerates the creation of recent WinUI apps utilizing a wizard-based expertise. Tasks created with this extension include well-formed, readable code and incorporate the most recent growth options whereas implementing confirmed patterns and main practices. The generated code consists of hyperlinks to documentation and TODO feedback that present helpful perception and steerage for turning the generated initiatives into manufacturing purposes. If you happen to’re new to WinUI/Home windows App SDK or need extra scaffolding like MVVM out-of-the-box in your new initiatives, Template Studio for WinUI (C#) is an effective way to get began!

Self-contained purposes

Home windows App SDK 1.1 introduces assist for self-contained deployment the place your app carries the WinAppSDK dependencies with it. This allows you to management the WinAppSDK model and use completely different deployment methods, like xcopy deployment. Be taught in regards to the variations between framework-dependent and self-contained deployment and comply with the self-contained deployment information to get began.

Bootstrapper APIs

The Bootstrapper APIs required for utilizing WinAppSDK options (e.g. WinUI 3, MRT Core) in apps that don’t deploy with MSIX are actually simpler to make use of and troubleshoot. Updates embody a brand new consumer UI immediate, extra logging to the occasion log, and extra choices to deal with failures together with calls to DebugBreak() and/or FailFast. These modifications have been largely motivated by suggestions from our group; thanks!

Surroundings Variable Supervisor

With WinAppSDK 1.1 you are actually in a position so as to add, take away, and modify atmosphere variables with out having to instantly use the registry API. Now, altering EVs within the course of, consumer, and machine scope is one unified expertise. Moreover, in packaged apps, EV modifications made by the atmosphere supervisor will routinely revert to cut back the quantity of EV modifications that apps depart behind. Take a look at EV Supervisor on GitHub for more information.

Staying within the loop

You possibly can keep updated with the group on the Home windows App SDK GitHub repo and the WinUI GitHub repo, and thru our month-to-month WinUI Group Calls the place we share roadmap updates and different thrilling information, and we demo new options.

You too can join with us on Twitter utilizing #WindowsAppSDK and @WindowsUI.

We sit up for seeing the attractive apps you create with WinAppSDK 1.1 & WinUI 3!

Pleased Coding!

Home windows App SDK group



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments