File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
MaterialDesignThemes.Wpf.Tests Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,16 @@ public async Task WhenDoubleClickAwayDialogCloses()
198
198
Assert . Equal ( 1 , closingCount ) ;
199
199
}
200
200
201
+ [ StaFact ]
202
+ [ Description ( "Issue 1618" ) ]
203
+ public void WhenDialogHostIsUnloadedIsOpenRemainsTrue ( )
204
+ {
205
+ _dialogHost . IsOpen = true ;
206
+ _dialogHost . RaiseEvent ( new RoutedEventArgs ( FrameworkElement . UnloadedEvent ) ) ;
207
+
208
+ Assert . True ( _dialogHost . IsOpen ) ;
209
+ }
210
+
201
211
private class TestDialog : Control
202
212
{
203
213
public void CloseDialog ( ) => DialogHost . CloseDialogCommand . Execute ( null , this ) ;
Original file line number Diff line number Diff line change @@ -705,7 +705,6 @@ private string SelectState()
705
705
private void OnUnloaded ( object sender , RoutedEventArgs routedEventArgs )
706
706
{
707
707
LoadedInstances . Remove ( this ) ;
708
- SetCurrentValue ( IsOpenProperty , false ) ;
709
708
}
710
709
711
710
private void OnLoaded ( object sender , RoutedEventArgs routedEventArgs )
You can’t perform that action at this time.
0 commit comments