<ListBox x:Name="Nav_ListBox" Margin="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Background="#FFF2F2F2" ItemTemplate="{DynamicResource pageTemplate}" ItemsSource="{Binding pageCollection}" Padding="6" IsTabStop="True" BorderThickness="0" Width="200" SelectedIndex="1" Style="{DynamicResource ListBoxStyle1}"/>
XML:<?xml version="1.0" encoding="utf-8"?><Pages><page id="page01"> <name>Page 01</name></page><page id="page02"> <name>Page 02</name></page></Pages>
private void SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) {ListBoxItem lbi = ((sender as ListBox).SelectedItem as ListBoxItem);string itemName = lbi.Content.ToString();if ( Nav_ListBox.SelectedItem.Equals("Page01" ) ){ContentFrame.Source = new Uri("Pages/Page01.xaml", UriKind.RelativeOrAbsolute);
}}