microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.35k stars 678 forks source link

Announcing: WinUI 3 - Windows App SDK 0.8! 🎉✨ #5260

Closed anawishnoff closed 2 years ago

anawishnoff commented 3 years ago

We've just shipped the latest stable version of WinUI 3, which is a part of Windows App SDK v0.8! This release includes lots of bug fixes and stability improvements. This version of WinUI 3 can be used for shipping production apps to the Microsoft Store.

Shipping WinUI 3 as a part of the Windows App SDK

In order to use this version of WinUI 3, you'll download the Project Reunion Visual Studio Extension (VSIX) to get started. The Project Reunion VSIX includes WinUI Project Templates that you'll use to build your WinUI 3 app, as well as access to other Windows App SDK components. The Windows App SDK package includes a reference to the WinUI 3 NuGet package.

For more on the Windows App SDK, see their documentation and repository. For installation instructions, see Set up your development environment.

NOTE: The Windows App SDK was previously known by the code name Project Reunion. Some SDK assets such as the VSIX extension and NuGet packages still use the code name, but these assets will be renamed in a future release. Some areas of this doc still use Project Reunion when referring to an existing asset or a specified earlier release.

What's new

These are all of the new changes in WinUI 3 since the release of Project Reunion 0.5.

Bug fixes

This is the list of all bugs fixed in WinUI 3 since Project Reunion 0.5.

Experimental Features

This release does not include experimental features. If you'd like to continue using experimental features in your app, feel free to continue using the latest Project Reunion 0.8 Preview.

Known Issues

For a list of all the known issues for the Windows App SDK 0.8, please see the Windows App SDK release notes.

Getting started

First, you'll need to set up your dev environment with the appropriate technologies. See our documentation for installation instructions and more information on project types:

Install the Windows App SDK

Create WinUI 3 Projects

While you're developing, check out the API Reference documentation.

Take a look at our walk-through docs:

You can also update your existing WinUI 3 app to use the new Windows App SDK 0.8 release using these instructions: Update existing projects to the latest release of the Windows App SDK.

We love feedback! We encourage you to file any bug, big or small, on our repo using this template. Knowing which issues and features are important and/or critical to our customers highly influences which ones we tackle. Even though we ship with the Windows App SDK, please continue to file WinUI-specific bugs on this repo.

Using WinUI 3 - Windows App SDK 0.8 with our ecosystem partners

This latest release is in the process of being integrated into several other important ecosystem technologies. To test out and follow that progress, check out some of our partner technologies below:

What's next

To keep up with progress being made on WinUI 3, please see our feature roadmap which gets updated regularly. We also give monthly updates on our WinUI Community Calls, where you can directly ask the team any questions you have.


Update #1 - Windows App SDK 0.8.1 is now available

Windows App SDK 0.8.1 is a stable servicing release that fixes a few critical bugs.

Bugs fixed in Windows App SDK 0.8.1:

The limitations and known issues for v0.8 also apply to v0.8.1, unless marked otherwise in our documentation.


Update #2 - Windows App SDK 0.8.2 is now available

Windows App SDK 0.8.2 is a stable servicing release that a couple more critical bugs for 0.8.0.

Bugs fixed in Windows App SDK 0.8.2:

The limitations and known issues for v0.8 also apply to v0.8.2, unless marked otherwise in our documentation.

thomasclaudiushuber commented 3 years ago

Congrats on getting this out.

Windows App SDK, I like it, it is what it is, this name is sooo much clearer and better than Project Reunion.

marcelwgn commented 3 years ago

Out of curiosity, why was ColorHelper.ToDisplayName removed? There isn't much of an alternative to it is there?

Also totally agree with @thomasclaudiushuber, Windows App SDK is a good name and better than Project Reunion.

Marv51 commented 3 years ago

Hi, could you clarify how much of the fixes and UI changes of 2.6 are in 0.8?

jschwizer99 commented 3 years ago

When updating from 0.8.0 preview to 0.8.0 I had to fix an incompatibility in the WinUI WinRT C++ projects that is a result of the namespace change from Microsoft::System to Microsoft::UI::Dispatching. The WinRT C++ helper function winrt::resume_foreground() cannot handle the new namespace and only works for the Windows and the old Microsoft.System namespace. I'm not sure who is in charge of the required modifications, the WinRT or WinUI team? Please forward this information to the appropriate team.

As a work-around it is possible to define a local version (as a copy) by exchanging the namespaces:

inline auto resume_foreground(
        Microsoft::UI::Dispatching::DispatcherQueue const& dispatcher,
        Microsoft::UI::Dispatching::DispatcherQueuePriority const priority = Microsoft::UI::Dispatching::DispatcherQueuePriority::Normal) noexcept
    {
        struct awaitable
        {
            awaitable(Microsoft::UI::Dispatching::DispatcherQueue const& dispatcher, Microsoft::UI::Dispatching::DispatcherQueuePriority const priority) noexcept :
                m_dispatcher(dispatcher),
                m_priority(priority)
            {
            }

            bool await_ready() const noexcept
            {
                return false;
            }

            bool await_resume() const noexcept
            {
                return m_queued;
            }

            bool await_suspend(impl::coroutine_handle<> handle)
            {
                return m_dispatcher.TryEnqueue(m_priority, [handle, this]
                    {
                        m_queued = true;
                        handle();
                    });
            }

        private:
            Microsoft::UI::Dispatching::DispatcherQueue const& m_dispatcher;
            Microsoft::UI::Dispatching::DispatcherQueuePriority const m_priority;
            bool m_queued{};
        };

        return awaitable{ dispatcher, priority };
    };

Beside the loss of winrt::Microsoft::UI::ColorHelper::ToDisplayName the transition worked well after the essential manual project file edits. Many thanks for the detailed upgrade description.

With each upgrade step bewteen preview and 'non-preview' (I did not name it stable release on purpose) I need to readjust my usage of some preview features e.g. TextAlignment="Right" for NumberBox. There are other features that are in this 'half-done' state for a long time. I appreciate a lot if this features could transition to a proper 'done' state. As a bonus some tickets could be closed that are open for a long time.

jtorjo commented 3 years ago

Initially I wanted to start a new discussion, but I'll just drop it here.

I'd really appreciate an ETA of when will win2d be ported to WinUI Desktop. This is pretty much what's holding me from using WinUI Desktop.

(please let me know if I should ask in another repository)

More info

I know there is work in progress regarding porting win2d to WinUI Desktop (https://github.com/Microsoft/Win2D/tree/reunion_master), but

asklar commented 3 years ago

When updating from 0.8.0 preview to 0.8.0 I had to fix an incompatibility in the WinUI WinRT C++ projects that is a result of the namespace change from Microsoft::System to Microsoft::UI::Dispatching. The WinRT C++ helper function winrt::resume_foreground() cannot handle the new namespace and only works for the Windows and the old Microsoft.System namespace. I'm not sure who is in charge of the required modifications, the WinRT or WinUI team? Please forward this information to the appropriate team.

As a work-around it is possible to define a local version (as a copy) by exchanging the namespaces:

inline auto resume_foreground(
        Microsoft::UI::Dispatching::DispatcherQueue const& dispatcher,
        Microsoft::UI::Dispatching::DispatcherQueuePriority const priority = Microsoft::UI::Dispatching::DispatcherQueuePriority::Normal) noexcept
    {
        struct awaitable
        {
            awaitable(Microsoft::UI::Dispatching::DispatcherQueue const& dispatcher, Microsoft::UI::Dispatching::DispatcherQueuePriority const priority) noexcept :
                m_dispatcher(dispatcher),
                m_priority(priority)
            {
            }

            bool await_ready() const noexcept
            {
                return false;
            }

            bool await_resume() const noexcept
            {
                return m_queued;
            }

            bool await_suspend(impl::coroutine_handle<> handle)
            {
                return m_dispatcher.TryEnqueue(m_priority, [handle, this]
                    {
                        m_queued = true;
                        handle();
                    });
            }

        private:
            Microsoft::UI::Dispatching::DispatcherQueue const& m_dispatcher;
            Microsoft::UI::Dispatching::DispatcherQueuePriority const m_priority;
            bool m_queued{};
        };

        return awaitable{ dispatcher, priority };
    };

Beside the loss of winrt::Microsoft::UI::ColorHelper::ToDisplayName the transition worked well after the essential manual project file edits. Many thanks for the detailed upgrade description.

With each upgrade step bewteen preview and 'non-preview' (I did not name it stable release on purpose) I need to readjust my usage of some preview features e.g. TextAlignment="Right" for NumberBox. There are other features that are in this 'half-done' state for a long time. I appreciate a lot if this features could transition to a proper 'done' state. As a bonus some tickets could be closed that are open for a long time.

@jschwizer99 theresume_foreground issue you mention is microsoft/WindowsAppSDK#957. @sylveon had a proposed fix for it in cppwinrt (see microsoft/cppwinrt#973) but that PR is not going to be landing.

codendone commented 3 years ago

@asklar #include to get the resume_foreground functionality.

asklar commented 3 years ago

yeah that's basically what the PR did, it would be nice to get it out of the box :) Perhaps something to consider to add to the winui3 targets via a ForceInclude

sylveon commented 3 years ago

Please don't - such implicit include behavior is unexpected, not controllable from anywhere in the user's source, and forces every file to include the bulk of cppwinrt.

I would suggest to make the templates include it in the PCH, and to better document this change for people coming from previous versions of the App SDK.

anawishnoff commented 3 years ago

@jtorjo I believe Win2d is supported in WinUI 3/Windows App SDK 0.8 (link to NuGet package here) for desktop apps. Is there a feature or something in particular that you're looking for that hasn't been ported over yet?

jtorjo commented 3 years ago

@anawishnoff Last time I checked (Reunion 0.5), CanvasBitmap and CanvasAnimatedControl weren't working. I will definitely give this a go -- it would be awesome if we could know what was implemented since Reunion 0.5, since the documentation on win2d is really obsolete.

anawishnoff commented 3 years ago

@jtorjo I see - I do think those two are still in the progress of being ported over. I'll let you know if I can find an update on their status.

Lukespacewalker commented 3 years ago

Is Mica material supported in Windows App SDK 0.8.1?

dylech30th commented 3 years ago

@Lukespacewalker No, 0.8.1 is a small patch including some critical bug fixes, you can see the more detailed information at Windows App SDK. IMO if you are waiting for the Mica material support you have to wait until the Windows App SDK 1.0 or at least its preview build

gabbybilka commented 2 years ago

Check out #6325 to see features from this release in Windows App SDK 1.0 and leave any additional comments.

michael-hawker commented 1 year ago

@bpulliam ToDisplayName still appear to be missing in the latest release, this never seemed resolved here on how we're supposed to upgrade these code paths. Also see: https://github.com/MicrosoftDocs/winrt-api/issues/2120

This effects our ColorToDisplayNameConverter in the toolkit, so not sure what to do with our comment here:

        // return global::Microsoft.UI.Xaml.ColorDisplayNameHelper.ToDisplayName(color);
        // Removed on Reunion 0.8-RC. Not sure what to replace with.