Hi,
I am trying to load a page with the PanelBar already expanded and the first item (sub item) already selected.
My initial thought was to try this declaratively using the IsExpanded and IsSelected properties. It looks like IsExpanded works as expected, but I can't get IsSelected to alter the style of the item (I would like it to appear the same way it appears after I click to select the item with the mouse).
Here's the declarative code:
Running this code, the beverages item is expanded, but Milk is not "selected" (style only changes after selected using mouse).
Can you help me get on the right track?
I am trying to load a page with the PanelBar already expanded and the first item (sub item) already selected.
My initial thought was to try this declaratively using the IsExpanded and IsSelected properties. It looks like IsExpanded works as expected, but I can't get IsSelected to alter the style of the item (I would like it to appear the same way it appears after I click to select the item with the mouse).
Here's the declarative code:
<UserControl x:Class="BindingPanelBar.Page" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" |
xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" |
xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"> |
<Grid x:Name="LayoutRoot" Background="Wheat"> |
<telerikNavigation:RadPanelBar x:Name="rpbActivities" ExpandMode="Single"> |
<telerikNavigation:RadPanelBarItem x:Name="rpbiBeverages" IsExpanded="True"> |
<telerikNavigation:RadPanelBarItem.Header> |
<TextBlock>Beverages</TextBlock> |
</telerikNavigation:RadPanelBarItem.Header> |
<telerikNavigation:RadPanelBarItem x:Name="rpbiMilk" Header="Milk" IsSelected="True"></telerikNavigation:RadPanelBarItem> |
<telerikNavigation:RadPanelBarItem x:Name="rpbiCoffee" Header="Coffee"></telerikNavigation:RadPanelBarItem> |
</telerikNavigation:RadPanelBarItem> |
<telerikNavigation:RadPanelBarItem x:Name="rpbiCondiments"> |
<telerikNavigation:RadPanelBarItem.Header> |
<TextBlock>Condiments</TextBlock> |
</telerikNavigation:RadPanelBarItem.Header> |
</telerikNavigation:RadPanelBarItem> |
<telerikNavigation:RadPanelBarItem x:Name="rpbiOptions"> |
<telerikNavigation:RadPanelBarItem.Header> |
<TextBlock>Options</TextBlock> |
</telerikNavigation:RadPanelBarItem.Header> |
</telerikNavigation:RadPanelBarItem> |
</telerikNavigation:RadPanelBar> |
</Grid> |
</UserControl> |
Running this code, the beverages item is expanded, but Milk is not "selected" (style only changes after selected using mouse).
Can you help me get on the right track?