I have created a RadPanelBar with two items. I want the DefaultItem to be selected by default. How can I do that dynamically?
Below is the xaml code for RadPanelBar
<telerik:RadPanelBar x:Name="mybar" Width="252" Height="500" HorizontalAlignment="Left" VerticalAlignment="Top" ExpandMode="Single" Margin="0,58,0,0" SelectedItem="{Binding PanelBarItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> <telerik:RadPanelBarItem x:Name="DefaultItem" > <telerik:RadPanelBarItem.Header> <TextBlock Text="Default Item" /> </telerik:RadPanelBarItem.Header> </telerik:RadPanelBarItem> <telerik:RadPanelBarItem x:Name="ExpandItem" > <telerik:RadPanelBarItem.Header> <TextBlock Text="Expand Item" /> </telerik:RadPanelBarItem.Header> <ListBox Height="200" Margin="1,17,1,143" ItemsSource="{Binding TList}" BorderBrush="Transparent" BorderThickness="0" SelectedItem="{Binding SelectedTool, Mode=TwoWay}" > </ListBox> </telerik:RadPanelBarItem> </telerik:RadPanelBar>
I also want the first item in the TList to be selected by default when ExpandItem is selected. Please help with this.
Thanks in Advance