Is it possible to display a modal window in SCSF application at the center of the screen

StackOverflow https://stackoverflow.com/questions/56859

  •  09-06-2019
  •  | 
  •  

Question

In SCSF application I would like to display a view as a modal window at the center of the screen. Is it possible to do that?

WindowSmartPartInfo doesn't have any option for setting screen postion.

Thanks.

Was it helpful?

Solution

Assuming you're talking about Winforms, not WPF since the WPF layer for CAB does expose this option. In winforms there is no option in the WindowSmartPartInfo to do this. However, you could extend it and extend WindowWorkspace to use your new SmartPartInfo (override the OnApplySmartPartInfo method).

Before you do this, you might want to check the contrib and community sites to see if anyone has already done it. I think I've seen one somewhere.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top