Capture double click event on caption bar of floating panel
Hi Sridharan,
Thank you for using Syncfusion products.
We would like to let you know that, your requirement for handling double click event can be achieved by handling DockStateChanging event. Please make use of the below code snippet for your reference.
Code Snippet:[C#]
|
void dockingManager1_DockStateChanging(object sender, Syncfusion.Windows.Forms.Tools.DockStateChangeEventArgs arg) { if (this.dockingManager1.IsFloating(arg.Controls[0])) { // Funtions can be performed here } }
|
We have also prepared sample as it tries to meet your requirement and it can be downloaded from below location.
Sample Location: Docking Manager.zip
Please let us know if you need any further assistance,
Regards,
Kannan.R
Thanks for the response.
Unfortunately your suggestion is not working out for my scenario.
I will give my scenario, it may help you to give me a solution
· Already the panel is in floating state.
· Have added some custom buttons for the floating form
Other settings of
docking manager as follows
this.dockingManager1.ShowCustomButtonsInFloating = true;
this.dockingManager1.VisualStyle = Syncfusion.Windows.Forms.VisualStyle.Office2007;
this.dockingManager1.CaptionButtons.Add(new Syncfusion.Windows.Forms.Tools.CaptionButton(Syncfusion.Windows.Forms.Tools.CaptionButtonType.Close, "CloseButton", 0, System.Drawing.Color.Transparent, "Close"));
this.dockingManager1.SetDockLabel(this.panel, "Panel Name");
this.dockingManager1.SetEnableDocking(this.panel, true);
ccbpanel.MergeWith(this.dockingManager1.CaptionButtons, false);
this.dockingManager1.SetCustomCaptionButtons(this.panel, ccbpanel);
My expectation is when I double click on the caption bar of the floating form, I need to change the size of the panel.
I have updated the code (you have shared) to reproduce the issue that I am facing. On my code, I am positioning the panel as given below
dockingManager1.SetDockVisibility(gradientPanel1, true);
dockingManager1.DockControl(gradientPanel1, this, DockingStyle.Top, 10);
dockingManager1.SetFloatOnly(gradientPanel1, true);
///
///Due to following lines double click event is not firing. Why?
///
DockHost dockHostGen = gradientPanel1.Parent as DockHost;
FloatingForm floatFormGen = dockHostGen.ParentForm as FloatingForm;
if (floatFormGen == null)
{
return;
}
floatFormGen.Size = new Size(200, 200);
floatFormGen.Location = this.PointToScreen(this.ClientRectangle.Location);
///
///
///
Am I missing something here?
Docking_Manager_96134363.zip
Hi Sridharan,
Thanks for your update.
|
Query |
Comments |
|
|
when I double click on the caption bar of the floating form, I need to change the size of the panel. |
We would like to let you know that, this requirement can be achieved using Docking Manager FloatControl and SetControlSize function. Please make use of below code snippet to achieve this requirement.
Code Snippet:[C#]
|
|
|
Due to following lines double click event is not firing. Why? |
We would like to let you know that, once control is enabled for floating alone using “SetFloatOnly” function in Docking Manager, double click event will not be triggered since its dock able option will be disabled.
We have also prepared a sample as it tries to meet both the reported requirements and it can be downloaded from below location:
Sample Location: Docking Manager.zip
|
Please let us know if it helps,
Regards,
Kannan.R
thanks!
DockingManager_b87bc868.zip
- 6 Replies
- 2 Participants
-
SP Sridharan Paul Pandian
- Jan 7, 2014 02:23 PM UTC
- Jan 20, 2014 10:07 AM UTC