Advertisement
Jmat4119

XAML used

Jun 10th, 2014
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 8.69 KB | None | 0 0
  1. <ListBox   Style="{StaticResource ResourceKey=ListBoxStyle}"   ItemContainerStyle="{StaticResource ListBoxItemStyle}"  Name="bookTOCBox" ItemsSource="{Binding}">
  2.             <ListBox.ItemTemplate >
  3.                 <DataTemplate>
  4.                     <StackPanel>
  5.                         <ToggleButton x:Name="toggleChild"  Style="{StaticResource ChapterHeadingStyle}"
  6.                                      IsChecked="{Binding IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}}"/>
  7.                         <ListBox ItemsSource="{Binding pages}"   Visibility="{Binding IsChecked, ElementName=toggleChild, Converter={StaticResource boolToVis}}" ScrollViewer.CanContentScroll="False" Style="{StaticResource ResourceKey=ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}" Margin="10,0,0,0"  >
  8.                             <ListBox.ItemTemplate>
  9.                                 <DataTemplate>
  10.                                     <StackPanel Orientation="Vertical">
  11.                                         <Button  Style="{StaticResource ResourceKey=NormalLinkButtonStyle}" Tag="{Binding}"  Click="btnNavigateToPage_Click" Name="btnNavigateToPage" Margin="10,0">
  12.                                             <Label Style="{StaticResource ResourceKey=PageNameLabelStyle}" Content="{Binding Path=label}"  />
  13.                                         </Button>
  14.                                         <ListBox ItemsSource="{Binding enrichment}" ScrollViewer.CanContentScroll="False" Style="{StaticResource ResourceKey=ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}" >
  15.                                             <ListBox.ItemTemplate>
  16.                                                 <DataTemplate>
  17.                                                     <StackPanel Orientation="Vertical">
  18.                                                         <Button  Style="{StaticResource ResourceKey=NormalLinkButtonStyle}" Tag="{Binding}"  Click="btnNavigateToPage_Click" Name="btnNavigateToPage" Margin="10,0">
  19.                                                             <Label Style="{StaticResource ResourceKey=PageNameLabelStyle}" Content="{Binding Path=label}"  />
  20.                                                         </Button>
  21.                                                     </StackPanel>
  22.                                                 /DataTemplate>
  23.                                             </ListBox.ItemTemplate>
  24.                                         </ListBox>
  25.                                     </StackPanel>
  26.                                 </DataTemplate>
  27.                             </ListBox.ItemTemplate>
  28.                         </ListBox>
  29.                         <ListBox ItemsSource="{Binding chapters}"   ScrollViewer.CanContentScroll="False" Style="{StaticResource ResourceKey=ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}" BorderThickness="0"    Margin="10,0,0,0" Visibility="{Binding IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Converter={StaticResource boolToVis}}">
  30.                             <ListBox.ItemTemplate>
  31.                                 <DataTemplate>
  32.                                     <StackPanel>
  33.                                         <ToggleButton x:Name="toggleChild"  Style="{StaticResource ChapterHeadingStyle}"
  34.                                                 IsChecked="{Binding IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}}"/>
  35.                                         <ListBox   ItemsSource="{Binding pages}"  Visibility="{Binding IsChecked, ElementName=toggleChild, Converter={StaticResource boolToVis}}" ScrollViewer.CanContentScroll="False" Style="{StaticResource ResourceKey=ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}" Margin="10,0,0,0" >
  36.                                             <ListBox.ItemTemplate>
  37.                                                 <DataTemplate>
  38.                                                     <StackPanel Orientation="Vertical">
  39.                                                         <Button  Style="{StaticResource ResourceKey=NormalLinkButtonStyle}" Tag="{Binding}"  Click="btnNavigateToPage_Click" Name="btnNavigateToPage" Margin="10,0">
  40.                                                             <Label Style="{StaticResource ResourceKey=PageNameLabelStyle}" Content="{Binding Path=label}"  />
  41.                                                         </Button>
  42.                                                         <ListBox  ItemsSource="{Binding enrichment}" ScrollViewer.CanContentScroll="False" Style="{StaticResource ResourceKey=ListBoxStyle}"  ItemContainerStyle="{StaticResource ListBoxItemStyle}" >
  43.                                                             <ListBox.ItemTemplate>
  44.                                                                  <DataTemplate>
  45.                                                                     <StackPanel Orientation="Vertical">
  46.                                                                         <Button  Style="{StaticResource ResourceKey=NormalLinkButtonStyle}" Tag="{Binding}"  Click="btnNavigateToPage_Click" Name="btnNavigateToPage" Margin="10,0">
  47.                                                                             <Label Style="{StaticResource ResourceKey=PageNameLabelStyle}" Content="{Binding Path=label}"  />
  48.                                                                         </Button>
  49.                                                                     </StackPanel>
  50.                                                                 </DataTemplate>
  51.                                                             </ListBox.ItemTemplate>
  52.                                                         </ListBox>
  53.                                                     </StackPanel>
  54.                                                 </DataTemplate>
  55.                                             </ListBox.ItemTemplate>
  56.                                         </ListBox>
  57.                                         <ListBox ItemsSource="{Binding chapters}" ScrollViewer.CanContentScroll="False" Style="{StaticResource ResourceKey=ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}" Margin="10,0,0,0"   Visibility="{Binding IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Converter={StaticResource boolToVis}}">
  58.                                             <ListBox.ItemTemplate>
  59.                                                 <DataTemplate>
  60.                                                     <StackPanel>
  61.                                                         <ToggleButton x:Name="toggleChild"  Style="{StaticResource ChapterHeadingStyle}"
  62.                                                            IsChecked="{Binding IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}}"/>
  63.                                                         <ListBox  ItemsSource="{Binding pages}"   Visibility="{Binding IsChecked, ElementName=toggleChild, Converter={StaticResource boolToVis}}"  ScrollViewer.CanContentScroll="False" Style="{StaticResource ResourceKey=ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}" Margin="10,0,0,0">
  64.                                                             <ListBox.ItemTemplate>
  65.                                                                 <DataTemplate>
  66.                                                                     <StackPanel Orientation="Vertical">
  67.                                                                         <Button  Style="{StaticResource ResourceKey=NormalLinkButtonStyle}" Tag="{Binding}"  Click="btnNavigateToPage_Click" Name="btnNavigateToPage" Margin="10,0">
  68.                                                                             <Label Style="{StaticResource ResourceKey=PageNameLabelStyle}" Content="{Binding Path=label}"  />
  69.                                                                         </Button>
  70.                                                                     </StackPanel>
  71.                                                                 </DataTemplate>
  72.                                                             </ListBox.ItemTemplate>
  73.                                                         </ListBox>
  74.                                                     </StackPanel>
  75.                                                 </DataTemplate>
  76.                                             </ListBox.ItemTemplate>
  77.                                         </ListBox>
  78.                                     </StackPanel>
  79.                                 </DataTemplate>
  80.                             </ListBox.ItemTemplate>
  81.                         </ListBox>
  82.                     </StackPanel>
  83.                 </DataTemplate>
  84.             </ListBox.ItemTemplate>
  85.     </ListBox>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement