I would like to create a custom "control" that is a subclass of "RadTabItem" and use it as the default tab class.
I know I can tie into the AddingNewTab event and effect the Item property of the event args, but that would be a UI Element in the ViewModel (VM) of a MVVM and I would like to keep the UI element strictly in the UI code (not in the VM).
Is there some way to specify (perhaps via .Resources) the class for a new tab created by clicking the "+" in the RadTabbedWindow.
e.g. something like the a "DefaultTab" element.
<DefaultTab Type="{x:Type MyTabClass}"/>
of the below
<telerik:RadTabbedWindow x:Class="PickCart.Client.Zza.Desktop.Tabs.TabbedView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:client="clr-namespace:PickCart.Client"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
Width="1024"
Height="800">
<b:Interaction.Triggers>
<b:EventTrigger EventName="AddingNewTab">
<b:CallMethodAction TargetObject="{Binding}" MethodName="OnAddingNewTab"/>
</b:EventTrigger>
</b:Interaction.Triggers>
<telerik:RadTabbedWindow.DataContext>
<client:TabbedViewModel/>
</telerik:RadTabbedWindow.DataContext>
<telerik:RadTabbedWindow.Resources>
<DefaultTab Type="{x:Type MyTabClass}"/>
</telerik:RadTabbedWindow.Resources>
<telerik:RadTabItem Header="Main" CloseButtonVisibility="Hidden">
<TextBlock Text="This is the main tab" />
</telerik:RadTabItem>
</telerik:RadTabbedWindow>