WindowWorkspace - views always TopMost?

Topics: CAB & Smart Client Software Factory
Sep 15, 2006 at 5:37 AM
originally posted by: MJMaster

In my application I sometimes need to display a view in a WindowWorkspace as opposed to in a DeckWorkspace. I have this working, however the view, when displayed in a WindowWorkspace, is always TopMost to the application (not system wide). I want to be able to click the Shell and bring that to the top over the view being displayed in the WindowWorkspace - is this possible?

I've searched here, in the SCSF message boards, and looked at the WindowSmartPartInfo all to no avail...

Any ideas?

Thanks in advance...
Sep 28, 2006 at 10:34 AM
originally posted by: DLorenz

After looking at the CAB code, nothing setthe TopMost property. The view is actually displayed on a private class called WindowForm that inherits directly from form. I think the TopMost property defaults to false. They end up calling BringToFront at the end. However, the issue may lie in the Owner of the WindowWorkspace being set. They make seperate calls depending on if the owner is present:

If Not ownerForm Is Nothing Then
End If

If you can somehow clear out the ownerform on the WindowWorkspace, it may work the way you want it to.
Jan 5, 2007 at 1:23 AM
originally posted by: RobertEwen


if you are using SCSF, you should have a look into your Infrascruture.Library Project.

There, the WindowWorkspace and the WindowSmartPartInfo are derived, so that you can add functionality to it.

And there is already a position to add more info ... Look at the WindowWorkspaceSetting.cs
Here you can add as much settings as you like.

In WindowWorkspace class you have the function "OnApplySmartPartInfo(...)" where you can add the assignments ...

To use your settings:

WindowSmartPartInfo info = new WindowSmartPartInfo();
info.KeysWindowWorkspaceSettings.YourSetting = theSetting;
workspace.Show(view, info);

kind regards