Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

New Post: reactivate exiting window using WindowManager

$
0
0

The Screen derived instances I want to handle the I way I described above, are always created using the WindowManager. So their parent "pseudo-Conductor" should always be the the windowmanager itself.

Anyway I implemented it the way you suggested but the window is not refocused:

publicvoid OpenOrReactivateSubView()
        {
            if (this.subViewModel == null)
            {
                this.subViewModel = new SubViewModel();
            }

            if (this.subViewModel.IsActive)
            {
                ((IDeactivate)this.subViewModel).Deactivate(false);
                ((IActivate)this.subViewModel).Activate();
                return;
            }

            this.windowManager.ShowWindow(this.subViewModel);
        }

Viewing all articles
Browse latest Browse all 1760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>