For windows containing Tab controls, if the Tab control contains more than five tab pages or the initialization of each tab page is complex, Appeon recommends you use the CreateOnDemand method of Tab control to improve the runtime performance of these windows.
When CreateOnDemand is enabled, only the current tab page that is created will be initiated. The initialization of the hidden tab pages takes place only when they are selected. Therefore the window will operate more efficiently.
Please keep in mind that as you make this change you may also need to modify other code of the Tab control. For example, if the current tab page uses data from another page, you need to:
-
Move the script that is used for obtaining data, to the SelectionChanged event.
-
Add a condition to validate whether the tab page carrying the data has been initiated. If initiated, the current tab page will successfully obtain the data; if not initiated, the user must select the tab page for initialization purposes, and the current tab page will successfully obtain the data.