I have RadTabcontrol and whenever user click on New button I want to add new tab containing usercontrol everytime.I have successfully achieved this at run time but due to some Performance issue I want to achieve this in xaml
I tried:
<Setter Property="telerikNavigation:RadTabControl.ItemContainerStyle">
<Setter.Value>
<Style TargetType="telerikNavigation:RadTabItem">
<Setter Property="Foreground" Value="Black"/>
<Setter Property="FontFamily" Value="Tahoma"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<!--<Setter Property="Content" >
<Setter.Value>
<ctrl:ctrlReview x:Name="Uctrl" REVKEY="{Binding Source={StaticResource RevKeyProvider}}">
</ctrl:ctrlReview>
</Setter.Value>
</Setter>-->
while setting value for property content,It giving me error:Cannot add content of type 'SafetyAuditUserControl.ctrlReview' to an object of type 'System.Object'.
Please help
I tried:
<Setter Property="telerikNavigation:RadTabControl.ItemContainerStyle">
<Setter.Value>
<Style TargetType="telerikNavigation:RadTabItem">
<Setter Property="Foreground" Value="Black"/>
<Setter Property="FontFamily" Value="Tahoma"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<!--<Setter Property="Content" >
<Setter.Value>
<ctrl:ctrlReview x:Name="Uctrl" REVKEY="{Binding Source={StaticResource RevKeyProvider}}">
</ctrl:ctrlReview>
</Setter.Value>
</Setter>-->
while setting value for property content,It giving me error:Cannot add content of type 'SafetyAuditUserControl.ctrlReview' to an object of type 'System.Object'.
Please help