MaterialDesignInXamlToolkit icon indicating copy to clipboard operation
MaterialDesignInXamlToolkit copied to clipboard

DialogHost control embedded in a drawer control shows weird behaviour

Open ben1976de opened this issue 5 years ago • 5 comments

  1. When having a DialogHost embedded in a Drawer control a strange behaviour can be seen when both are opened. Please see attached image which was captured using the latest WPF demo project:

grafik

  1. Next issue: when removing an user control which is holding an opened DialogHost from the visible tree the DialogContent is gone after putting the user control back on the drawing stack. Step 1) Go to the Dialogs menu and open any DialogHost control you prefer. Leave it open.

grafik

Step 2) Switch to a different menu via the Drawer. Step 3) Get back to the Dialogs menu.

grafik

  1. In a project I have the IsOpen state of the DialogHost is getting lost (it closes itself) when removing a UserControl (containing the DialogHost) from the drawing stack even if its state is set statically to True in XAML.

ben1976de avatar Aug 26 '20 15:08 ben1976de

@ben1976de so do i , solved it?

visualczm avatar Nov 13 '20 06:11 visualczm

@ben1976de @Keboo @punker76

 opLogin1.IsOpen = false; //first set false
 opLogin1.IsOpen = true; 

can be show it~

visualczm avatar Nov 17 '20 06:11 visualczm

@ben1976de @visualczm The reason for the first screenshot is, that the DialogHost uses a Popup to show the dialog. Popups are always on top of the window.

punker76 avatar Nov 17 '20 07:11 punker76

@punker76 Thank you for the answer

@ben1976de Question i.e Run demo app Setup1: Select dialogs page , Click sample4 run like i.e image

Setup2: Select others page , Then go back , Dialogs content lost, But dialogs exist i.e image

My temporary solution

 opLogin1.IsOpen = false; //first set false
 opLogin1.IsOpen = true; 

visualczm avatar Nov 17 '20 07:11 visualczm

I think that when you switch between menus, dialog host (popup window) is totally vanishes and should be recreated. May be just close all dialogs before switching to other menu?

Erapchu avatar Jan 10 '21 10:01 Erapchu