We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Floating windows


So far when the user sets windows as floating, the whole application (all open floating windows and the parent form) show up when the user clicks on one of them.

Is it possible to have a setup in which only a certain window comes on top?

Thank you,

Razvan

3 Replies

RB Rajasekar B Syncfusion Team January 13, 2010 03:21 PM UTC

Hi Razvan,

When the window is made to float, it will be shown on the top. So all the floating windows will be displayed on the top. This is the behavior of the floating window.

If you want to show any particular window, you can hide other windows using,
dockingManager.SetDockVisibility(ctrl,false);

And show it using,
dockingManager.SetDockVisibility(ctrl,true);

If you want to access all the docked controls, you can use
IEnumerator dockedControls = dockingManager.Controls;

It will return an enumerator. So you can iterate through the docked controls collection. Let me know if you have nay question.

Thanks,
Rajasekar


RH Razvan Herdea January 20, 2010 02:06 PM UTC


Rajasekar,

Thanks for your answer. I still wanted a solution to my problem and I found the one below. When the control is floated, in the associated event I change it's "frame" to behave as an independent window. Do you think this may cause any problems? So far seems to be OK. it even allows the user to re-dock the control.

Regards,

Razvan


private void dockManager_DockStateChanged(object sender, Syncfusion.Windows.Forms.Tools.DockStateChangeEventArgs arg)
{
foreach (Control ctrl in arg.Controls)
{
if (this.dockManager.IsFloating(ctrl))
{
//when floating make it look like a regular form, with no parent
FloatingForm form = (FloatingForm)((DockHost)ctrl.Parent).ParentForm;
form.FormBorderStyle = FormBorderStyle.Sizable;
form.Owner = null;
form.ShowInTaskbar = true;
form.BringToFront();
form.WindowState = FormWindowState.Normal;
}
}

}


RB Rajasekar B Syncfusion Team January 21, 2010 01:48 PM UTC

Hi Razvan,

Changing the frame for the floating window will not cause any problem. But the caption text will overlap the icon. You can make the icon invisble by

form.ShowIcon=false;

Let me know if you have any question.

Thanks,
Rajasekar

Loader.
Live Chat Icon For mobile
Up arrow icon