I attached a sample solution demonstrating how to implement your requirement.
However, please keep in mind that the RadPanelBar
control is essentially an ItemsControl
that is designed to display hierarchical data similarly to the RadTreeView
control. So it might be better to try an approach where the RadPanelBar
control is data bound to a hierarchical collection of data as described in this tutorial
Also, as in your code snippet, the RadPanelBarItems
are declaratively defined, the PanelBarItem
object should be of type RadPanelBarItem
. However, it is considered a bad practice to use visual elements inside the view models. This is why I modified your PanelBar
definition to control the selection of the PanelBar
items through the xaml settings (setting the DefaultItem IsSelected
property to True
will do the trick) and I only bound the ListBox.SelectedItem
property as the control is data bound to a collection of business items.
the Telerik team