I have a CustomTabItem
in a custom controls library. When I explicitly use it in xaml or in code, it works. When I use the binding to ViewModel
(CaliburnMicro) instead of my control, the standard TabItem
is used. How to specify the use of CustomTabItem
in xaml?
I tried to specify DataType = "{x:Type adc:ActorTabItem}"
- did not work.
I tried to specify DataType="{x:Type adc:CustomTabItem}"
- did not work.
<adc:TabControl ItemsSource="{Binding Pages}" Grid.Row="1">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"></TextBlock>
</DataTemplate>
</TabControl.ItemTemplate>
<adc:TabControl.ContentTemplate>
<DataTemplate>
<ContentControl cal:View.Model="{Binding}" />
</DataTemplate>
</adc:TabControl.ContentTemplate>
</adc:TabControl>