punker76 / MahApps.Metro.SimpleChildWindow

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

CloseEvent #84

Closed maurosampietro closed 5 years ago

maurosampietro commented 5 years ago

It would be nice if a event would be raised when the window closes via the close button or esc or if a flag could state that happend.

This way if in a wizard multiple windows are chained we can break the chain of windows to show the user:

      await ChildWindowManager.ShowChildWindowAsync( this, child0, ChildWindowManager.OverlayFillBehavior.FullWindow );

      if( !child0.WasClosedByEscOrCloseButton )
      {
            await ChildWindowManager.ShowChildWindowAsync( this, child1, ChildWindowManager.OverlayFillBehavior.FullWindow );

            if( !child1.WasClosedByEscOrCloseButton )
            {
                await ChildWindowManager.ShowChildWindowAsync( this, child2, childWindowManager.OverlayFillBehavior.FullWindow );
            }
     }