Hi,
The problem is that I don't have control over the users of the application and I don't know what actions our clients are going to perform. They will simply close the panel (is the intuitive use) and they will find the problem. To avoid it, in the "DockingManager_DockStateChanged" event, I have accessed the "Page" of its content and call to the Dispose() of the WebView2. In this way the sound stops.
What worries me about all of this is if the DockingManager control is actually removing the controls from the removed panels and freeing up memory or this is no happening even though I do Children.Remove(sender). If the audio sounds, it means that it is in memory. Who assures me that when users have been opening and closing DockingManager´s panels for hours (I have more than 60 different types of panels that users can load, with different controls within each one, so the Dispose() solution is not viable for all cases) do not end up having performance problems until the application crashes?
Thank you.