0

In my WPF form i have button Control when i click that button Dynamically tabcontroll is added in the form inside that tab control one page is there. On that page many data are there .so the tabcontrol take time to load in the form.

I want to show the tab control first then i want to add the page in the tab. Is it Possible with the help of background worker or any other thread.

joby james
  • 71
  • 3

1 Answers1

0

The problem is that UI elements have to be created on the UI thread. So you cannot create those elements in a different thread, such as in a BackgroundWorker.

If getting the data is the slow part, you could use PriorityBindings.

Daniel Rose
  • 17,233
  • 9
  • 65
  • 88
  • My requirement is that show tab first then after that page add in that tab. – joby james Jan 17 '12 at 12:19
  • @joby Could you please describe more clearly what you are trying to do? I have no idea what that sentence is supposed to mean. – Daniel Rose Jan 17 '12 at 12:21
  • Hello Friend, In my form i a have a Button when i click that button Dynamically TabControl is adding in the WpF Form and inside that TabControl Dynamically Pages is adding. i want to load the tab control to the form at first later i want to add pages in my tab control.how can i achieve that functionality. – joby james Jan 17 '12 at 12:39
  • So you have multiple pages in that TabControl. See http://stackoverflow.com/questions/1389769/wpf-virtualizingstackpanel-for-increased-performance for using virtualization in a TabControl. – Daniel Rose Jan 17 '12 at 12:51