Won't fix
Last Updated: 25 Oct 2018 14:07 by ADMIN
ADMIN
Telerik Admin
Created on: 27 Dec 2010 14:52
Category: PanelBar
Type: Bug Report
1
PanelBar: Setting Background in the ItemContainerStyle of the non-root level RadPanelBarItems doesn`t work
When using an ItemContainerStyle on the second(non-root) BarItems, the Background doesn`t apply
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
1 comment
ADMIN
Vicky
Posted on: 25 Oct 2018 14:04
Won't Fix: When using ItemContainerStyle with static items, it will get applied only to the direct children of the RadPanelBar - the top-level items.
To achieve same styling on the non-root level items, ItemContainerStyle needs to be manually set on their parent items.
When using the ItemContainerStyle with dynamic items, its value gets inherited through the hierarchy thanks to the HierarchicalDataTemplate.
The inheritance can be interrupted, when needed, by using multiple nested HierarchicalDataTemplates and by setting the ItemContainerStyle property of each of them.
As RadPanelBar inherits from RadTreeView, the following approach can be used for the dynamic items scenario: https://docs.telerik.com/devtools/wpf/controls/radtreeview/styles-and-templates/styling-and-appearance-item-container-style
As a workaround for static items scenario implicit styles can be used, e.g. :
<Style TargetType="telerik:RadPanelBarItem">
    <Setter Property="Background" Value="LightBlue" />
</Style>