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.
Unfortunately, activation email could not send to your email. Please try again.

Floating windows

Thread ID:

Created:

Updated:

Platform:

Replies:

92403 Jan 12,2010 02:38 PM Jan 21,2010 08:48 AM Windows Forms 3
loading
Tags: Tools
Razvan Herdea
Asked On January 12, 2010 02:38 PM


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

Rajasekar B [Syncfusion]
Replied On January 13, 2010 10:21 AM

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

Razvan Herdea
Replied On January 20, 2010 09:06 AM


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;
}
}

}

Rajasekar B [Syncfusion]
Replied On January 21, 2010 08:48 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;