unoplatform / uno

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
https://platform.uno
Apache License 2.0
8.76k stars 706 forks source link

When using a multi Window, the event Closed or Unloaded on a control is never called #17887

Closed ArchieCoder closed 3 weeks ago

ArchieCoder commented 1 month ago

Current behavior

I don't have any way to know if a window is closed. I need this event in order to cancel downloading a file.

It works with WinUI.

Expected behavior

Closed event should be called along with Unloaded events on window's controls.

Maybe there is a memory leak because of this.

How to reproduce it (as minimally and precisely as possible)

You can use the WindowingSamples and add this XAML line Closed="CustomWindow_OnClosed".

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

Skia (WPF)

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

ArchieCoder commented 1 month ago

@MartinZikmund fyi

ArchieCoder commented 3 weeks ago

Tested, it works, thanks.