I have a template selector that I would like to work with the RadPanelBarItem items presenter. Unfortunatley the template is never called. I am doing the following:
And am using the following Style for the RadPanelBarItem (Cut for brevity)
<Style x:Key="PanelBarItemKey" TargetType="{x:Type telerik:RadPanelBarItem}">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1"
StartPoint="0.5,0">
<GradientStop Color="White" />
<GradientStop Color="Gainsboro"
Offset="0.43" />
<GradientStop Color="#FFADADAD"
Offset="0.44" />
<GradientStop Color="#FFD4D4D4"
Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush"
Value="#FF848484" />
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="Foreground"
Value="Black" />
<Setter Property="Padding"
Value="3" />
<Setter Property="HorizontalContentAlignment"
Value="Stretch" />
<Setter Property="VerticalContentAlignment"
Value="Stretch" />
<Setter Property="HeaderTemplate"
Value="{StaticResource PanelBarItemTemplate}" />
<Setter Property="ItemsSource"
Value="{Binding SelectedTrigger}" />
<Setter Property="ItemTemplateSelector"
Value="{StaticResource TriggerTemplateSelectorKey}" />
<Setter Property="ChildItemsTemplate">
And the following Template Selector:
The Items in the RadPanelBarItems need to call the template selector which I thought would be called by setting the ItemTemplateSelector in the Style, but this does not seem to be the case. How can I call my template selector in the RadPanelBarItem Style?
I am using the following to link to further illustrate.
If I do the following in XAML the template selector is called but I don't know how many RadPabelBarItems I will have:
I have not had any luck with this so I am currently trying to do it procedurally. Is this possible to do this in XAML?
Regards,
Joseph