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

How to make events fire with unloading of the TabControlExt in selection change?

Platform: WPF |
Control: TabControlExt

Events of the elements in the TabItemExt’s content does not fire after TabItem selection change when hooked in constructor. This is due to content unloading behaviour of the TabControlExt. Content of TabItemExt is unloaded on selection change and loaded again when this tab item is selected. This problem can be resolved by hooking all the events in the Loaded event instead of the constructor.

For example, there are two TabItems and their contents are UserControl1 and UserControl2, respectively.

In the UserControl1, events of its elements are hooked in its constructor.

In the UserControl2, events of its elements are hooked in its Loaded event.


UserControl1.xaml and UserControl2.xaml



The following screenshots show the TextChanged event failed to fire after Tab selection change in TabItem 1:

Figure 1: TextChanged event firing before tab item selection change


Figure 2: TextChanged event not firing after tab item selection change

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile