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

New Post: window manager issue

$
0
0

I have a strange issue with the window manager - has anybody else encountered this?

I have a Conductor<IScreen>.Collection.OneActive. This is the main view model (ie, shell). One of the view models it conducts uses window manager to open a new window that displays details about what they clicked.

The detail window is a form and I have CanClose overridden. When the user attempts to close, my logic runs - but if I callback(true) not only does the detail window close, the mainview model (The conductor) disappears to the background. So if you have my application open and it has focus above a couple other apps, it will hide behind all of them.
I don't have time to create a sample reproducing this, but if anyone else has experienced this, please let me know what I'm doing wrong.

This is the snippet I use to open the window:

 

dynamic settings = new ExpandoObject();
 settings.WindowStartupLocation = WindowStartupLocation.CenterOwner;
 settings.ResizeMode = ResizeMode.NoResize;

 var iconUri = new Uri("pack://application:,,,/Icons/windowIcon.png", UriKind.RelativeOrAbsolute);
 settings.Icon  = BitmapFrame.Create(iconUri);
 _windowManager.ShowWindow(detailScreen, null, settings);

Viewing all articles
Browse latest Browse all 1760

Trending Articles



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