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.
Syncfusion Feedback

Custom button events

Thread ID:

Created:

Updated:

Platform:

Replies:

130123 Apr 23,2017 10:22 PM UTC Apr 24,2017 06:28 AM UTC Windows Forms 2
loading
Tags: DockingManager
Mariusz Juszkiewicz
Asked On April 23, 2017 10:22 PM UTC

How do you enable click event on custom button in docking manager that has been added through designer?

Senthil Kumaran Rajan [Syncfusion]
Replied On April 24, 2017 06:23 AM UTC

Hi Mariusz, 
 
Thanks for contacting Syncfusion Support. 
 
We can handle the click event of the custom button in DockingManager, by finding the index of the custom button in the CaptionButtons collection and hook the click event of that caption button. This event cannot be directly handled from the designer. Please make use of the below code example. 
 
Code Example[C#]: 
 
this.dockingManager1.CaptionButtons[5].Click += new CancelEventHandler(Form1_Click); 
 
  void Form1_Click(object sender, CancelEventArgs e) 
        { 
            MessageBox.Show("Custom Caption Button Clicked"); 
        } 
 
 
We have prepared the sample for your reference and this can be downloaded from the below location. 
 
Sample : 
 
Also, refer the below screenshot for further reference. 
 
 
 
Could you please check with the above sample and let us know the provided solution is helpful? If not, please share us some additional details about this requirement. It will help to analyze and provide you a prompt solution at the earliest.   
 
Regards, 
Senthil

Senthil Kumaran Rajan [Syncfusion]
Replied On April 24, 2017 06:28 AM UTC

Hi Mariusz, 
 
Please ignore our previous update 
 
We can handle the click event of the custom button in DockingManager, by finding the index of the custom button in the CaptionButtons collection and hook the click event of that caption button. This event cannot be directly handled from the designer. Please make use of the below code example. 
 
Code Example[C#]: 
 
this.dockingManager1.CaptionButtons[5].Click += new CancelEventHandler(Form1_Click); 
 
  void Form1_Click(object sender, CancelEventArgs e) 
        { 
            MessageBox.Show("Custom Caption Button Clicked"); 
        } 
 
 
We have prepared the sample for your reference and this can be downloaded from the below location. 
 
 
Also, refer the below screenshot for further reference. 
 
 
 
Could you please check with the above sample and let us know the provided solution is helpful? If not, please share us some additional details about this requirement. It will help to analyze and provide you a prompt solution at the earliest.   
 
Regards, 
Senthil

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.

Warning Icon 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.Close Icon

;