microsoft / WindowsAppSDK

The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
https://docs.microsoft.com/windows/apps/windows-app-sdk/
MIT License
3.84k stars 322 forks source link

Docs: contradiction in docs about single instance apps #4847

Open fabianoriccardi opened 1 week ago

fabianoriccardi commented 1 week ago

Describe the bug

There is a contradiction info about the default behavior of app instancing. I think in WinUI / Windows App SDK the correct is that they are multi-instance by default.

Steps to reproduce the bug

The links:

WinUI apps are single-instanced by default

WinUI apps are multi-instanced by default.

Expected behavior

No response

Screenshots

No response

NuGet package version

None

Packaging type

No response

Windows version

No response

IDE

No response

Additional context

No response

alvinashcraft commented 1 week ago

Hi @fabianoriccardi. Thanks for reporting this inconsistency. I'll verify the behavior again, but in my testing of WinUI apps out of the box, they are multi-instanced. I'll verify and fix this issue in the docs and will follow up when the changes are merged.

alvinashcraft commented 1 week ago

The docs have been updated so the first page you've linked says that WinUI apps are multi-instanced by default. I have one minor tweak to the wording from a second PR that hasn't published yet, but it should be live in 10-15 minutes.

fabianoriccardi commented 1 week ago

Great!

WinUI apps are multi-instanced by default but have the ability to become single-instanced by deciding at launch-time whether to create a new instance or activate an existing instance instead.

I don't remember the exact wording of this whole sentence, but now, for sure, reflects what exactly happens: at the core the app, in the core, is always a multi-instance app, but the second instance can quit itself and reactivate the already existing instance. As a developer feels like a hack, but from user perspective it works perfectly.