I'm tryig to use TabControl in Caliburn micro WPF project. I have two ViewModels (userControls) and I want the user to switch between them using tabcontrol.
I tried two different approaches, but I get the same problem with both of them. After switching tabs (I click on second tab and then back on first), my application starts visibly lagging. For example if I click on a checkbox there is a visible delay.
It is the same problem as in this question: TabControl becoming very laggy, difference is that I am using caliburn micro and I am not sure that ListBox would be appropriate in my situation.
I tried implementing it this way:
<TabControl>
<TabItem Header="Item1">
<ContentControl
x:Name="Item1"/>
</TabItem>
<TabItem Header="Item2">
<ContentControl
x:Name="Item2"/>
</TabItem>
</TabControl>
I also tried using Conductor.Collection.OneActive:
this.Items.Add(Item1);
this.Items.Add(Item2);
XAML:
<TabControl Name="Items"/>
Everything works fine, it loads fast, tab switching is fast. The only problem is that rendering performance is really bad.
Any help would be appreciated.