Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ListBox Style="{StaticResource ResourceKey=ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}" Name="bookTOCBox" ItemsSource="{Binding}">
- <ListBox.ItemTemplate >
- <DataTemplate>
- <StackPanel>
- <ToggleButton x:Name="toggleChild" Style="{StaticResource ChapterHeadingStyle}"
- IsChecked="{Binding IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}}"/>
- <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" >
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Vertical">
- <Button Style="{StaticResource ResourceKey=NormalLinkButtonStyle}" Tag="{Binding}" Click="btnNavigateToPage_Click" Name="btnNavigateToPage" Margin="10,0">
- <Label Style="{StaticResource ResourceKey=PageNameLabelStyle}" Content="{Binding Path=label}" />
- </Button>
- <ListBox ItemsSource="{Binding enrichment}" ScrollViewer.CanContentScroll="False" Style="{StaticResource ResourceKey=ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}" >
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Vertical">
- <Button Style="{StaticResource ResourceKey=NormalLinkButtonStyle}" Tag="{Binding}" Click="btnNavigateToPage_Click" Name="btnNavigateToPage" Margin="10,0">
- <Label Style="{StaticResource ResourceKey=PageNameLabelStyle}" Content="{Binding Path=label}" />
- </Button>
- </StackPanel>
- /DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <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}}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <ToggleButton x:Name="toggleChild" Style="{StaticResource ChapterHeadingStyle}"
- IsChecked="{Binding IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}}"/>
- <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" >
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Vertical">
- <Button Style="{StaticResource ResourceKey=NormalLinkButtonStyle}" Tag="{Binding}" Click="btnNavigateToPage_Click" Name="btnNavigateToPage" Margin="10,0">
- <Label Style="{StaticResource ResourceKey=PageNameLabelStyle}" Content="{Binding Path=label}" />
- </Button>
- <ListBox ItemsSource="{Binding enrichment}" ScrollViewer.CanContentScroll="False" Style="{StaticResource ResourceKey=ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}" >
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Vertical">
- <Button Style="{StaticResource ResourceKey=NormalLinkButtonStyle}" Tag="{Binding}" Click="btnNavigateToPage_Click" Name="btnNavigateToPage" Margin="10,0">
- <Label Style="{StaticResource ResourceKey=PageNameLabelStyle}" Content="{Binding Path=label}" />
- </Button>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <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}}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <ToggleButton x:Name="toggleChild" Style="{StaticResource ChapterHeadingStyle}"
- IsChecked="{Binding IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}}"/>
- <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">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Vertical">
- <Button Style="{StaticResource ResourceKey=NormalLinkButtonStyle}" Tag="{Binding}" Click="btnNavigateToPage_Click" Name="btnNavigateToPage" Margin="10,0">
- <Label Style="{StaticResource ResourceKey=PageNameLabelStyle}" Content="{Binding Path=label}" />
- </Button>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement