punker76 / MahApps.Metro.SimpleChildWindow

A simple child window for MahApps.Metro
MIT License
374 stars 55 forks source link

Childwindow being displayed behind another childwindow #107

Closed eliezeralmeida closed 3 years ago

eliezeralmeida commented 4 years ago

In a MetroWindow a childwindow was opened and MetroWindow was injected into the constructor. This is to be able to open a new childwindow from the childwindow that was opened later.

Both childwindows are with: IsModal = True

In some clients, with different versions of windows, I did not identify a pattern, I did not identify the reason, the second childwindow is being displayed behind the one that is already open, breaking the childs stack. Because they are both modal, it is not possible to click on the previous one and bring it forward.

I decided to post the issue to find out if this has already happened to someone, or if this type of use is recommended.

timunie commented 4 years ago

Hi @eliezeralmeida , I personally never showed more than one ChildWindow. But if you really need to, you may try to set the Canvas.ZIndex (for each new window one higher). Note: I didn't test this.

Happy coding Tim

punker76 commented 4 years ago

@eliezeralmeida Which Version are you use?

eliezeralmeida commented 4 years ago

<package id="MahApps.Metro.SimpleChildWindow" version="1.5.0" targetFramework="net452" />

timunie commented 4 years ago

@eliezeralmeida how should I interpret the 👀 -emoji? Do you wonder how to apply this property or don't you want a temporary workaround (until it the issue is fixed, if it can be fixed) at all?

Happy coding, Tim

eliezeralmeida commented 4 years ago

@eliezeralmeida how should I interpret the 👀 -emoji? Do you wonder how to apply this property or don't you want a temporary workaround (until it the issue is fixed, if it can be fixed) at all?

Happy coding, Tim

I appreciate your solution, the emoji is to say that I saw the message and I will try :)

eliezeralmeida commented 3 years ago

Sorry, I forgot to close the issue. I managed to set the child parent as hide and display only the last call.