Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Preload the TabItems of a databound TabControl

$
0
0

Hi,

I have a TabControl whose ItemsSource is bound to an OberservableCollection. By default the TabControl loads the content a newly selected TabItem when the user selects that item. As the DataTemplate of my TabItem is somewhat complex and takes some time to fully load, each time the user selects a tab there is a noticable lag until the content of the tab is shown. The TabControl also seems to discard tabs that are already loaded but currently not shown, as the lag also occurs when you select a tab that has already been used before.

Is there any way to preload the content of all TabItems when the application gets started / loads a new file? (increasing the startup time or file load time isn't a problem)


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>