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

How to detect a change in the currently selected child

Hi,
I need to do some actions when the user changes the focus to another panel child. How to do it? Please help.

3 Replies

KP Kanniyappan Panneer Selvam Syncfusion Team October 10, 2019 05:51 AM UTC

Hi Tomasz, 
 
Thanks for contacting Syncfusion support. 
 
We have checked your query “Do the action when user change the focus to the another panel of DockingManager” at our end. We have achieved your requirement by invoking the ActiveWindowChanging event of DockingManager which can be triggered when focus of the child window changing. Also we can cancel the focus changing of any child by setting Cancel event argument as true. Please find the code snippet, screenshot and sample for the same. 
 
Code Snippet: 
 
// occurs when focus of the child window changes 
            this.SyncDockingManager.ActiveWindowChanging += SyncDockingManager_ActiveWindowChanging; 
 
private void SyncDockingManager_ActiveWindowChanging(FrameworkElement sender, Syncfusion.Windows.Tools.Controls.ActiveWindowChangingEventArgs e) 
        { 
              //Do the actions 
 
            if((e.NewValue as  ContentControl).Name == "Output") 
            {   
                // handles the focus changing to the Output window 
                e.Cancel = true; 
            } 
        } 
 
 
Please try the above solution and let us know if it is helpful. 
 
Regards, 
Kanniyappan P  



TO Tomasz October 13, 2019 02:47 PM UTC

Thank you. This solution fully solves my problem.


KP Kanniyappan Panneer Selvam Syncfusion Team October 14, 2019 06:08 AM UTC

Hi Tomasz,  
  
Thanks for you update.  
  
We are glad to know that the reported issue has been resolved at your end. Please let us know if you need any further assistance on this. We are happy to help you.  
  
Regards,  
Kanniyappan P 


Loader.
Live Chat Icon For mobile
Up arrow icon