| <Window x:Class="VersOne.Epub.WpfDemo.Views.BookView" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:controls="clr-namespace:VersOne.Epub.WpfDemo.Controls" | |
| Title="EpubReader demo — Book" Width="1024" Height="768" | |
| Style="{StaticResource windowStyle}"> | |
| <Grid> | |
| <Border Visibility="{Binding IsLoading, Converter={StaticResource booleanToInverseVisibilityConverter}}" BorderThickness="0,1,0,0" | |
| BorderBrush="#FF989898"> | |
| <Grid> | |
| <Grid.ColumnDefinitions> | |
| <ColumnDefinition Width="240" MinWidth="120" /> | |
| <ColumnDefinition Width="Auto" /> | |
| <ColumnDefinition /> | |
| </Grid.ColumnDefinitions> | |
| <controls:NavigationTreeView Grid.Column="0" ItemsSource="{Binding Navigation}"> | |
| <controls:NavigationTreeView.ItemContainerStyle> | |
| <Style TargetType="TreeViewItem" BasedOn="{StaticResource {x:Type TreeViewItem}}"> | |
| <Setter Property="IsExpanded" Value="{Binding Path=IsTreeItemExpanded, Mode=TwoWay}" /> | |
| </Style> | |
| </controls:NavigationTreeView.ItemContainerStyle> | |
| <controls:NavigationTreeView.ItemTemplateSelector> | |
| <controls:NavigationTemplateSelector> | |
| <controls:NavigationTemplateSelector.NavigationHeaderTemplate> | |
| <HierarchicalDataTemplate ItemsSource="{Binding NestedItems}"> | |
| <controls:NavigationHeader Command="{Binding DataContext.NavigateCommand, RelativeSource={RelativeSource AncestorType=controls:NavigationTreeView}}" | |
| CommandParameter="{Binding}" /> | |
| </HierarchicalDataTemplate> | |
| </controls:NavigationTemplateSelector.NavigationHeaderTemplate> | |
| <controls:NavigationTemplateSelector.NavigationItemTemplate> | |
| <HierarchicalDataTemplate ItemsSource="{Binding NestedItems}"> | |
| <controls:NavigationItem Command="{Binding DataContext.NavigateCommand, RelativeSource={RelativeSource AncestorType=controls:NavigationTreeView}}" | |
| CommandParameter="{Binding}" /> | |
| </HierarchicalDataTemplate> | |
| </controls:NavigationTemplateSelector.NavigationItemTemplate> | |
| </controls:NavigationTemplateSelector> | |
| </controls:NavigationTreeView.ItemTemplateSelector> | |
| </controls:NavigationTreeView> | |
| <GridSplitter Grid.Column="1" Width="4" Height="Auto" HorizontalAlignment="Stretch" Background="White" BorderBrush="#FF989898" | |
| BorderThickness="0,0,1,0" /> | |
| <Grid Grid.Column="2"> | |
| <Grid.RowDefinitions> | |
| <RowDefinition /> | |
| <RowDefinition Height="Auto" /> | |
| </Grid.RowDefinitions> | |
| <controls:BookHtmlContent Grid.Row="0" EpubArchive="{Binding CurrentEpubArchive}" HtmlContentFile="{Binding CurrentHtmlContentFile}" | |
| Anchor="{Binding CurrentAnchor}" /> | |
| <Border Grid.Row="1" BorderThickness="0,1,0,0" BorderBrush="#FF989898" Padding="4"> | |
| <Grid> | |
| <Grid.ColumnDefinitions> | |
| <ColumnDefinition Width="Auto" /> | |
| <ColumnDefinition /> | |
| <ColumnDefinition Width="Auto" /> | |
| </Grid.ColumnDefinitions> | |
| <Button Grid.Column="0" Content="< PREVIOUS" Style="{StaticResource prevNextNavigationButton}" | |
| Visibility="{Binding IsPreviousButtonVisible, Converter={StaticResource booleanToVisibilityConverter}}" | |
| Command="{Binding PreviousCommand}" /> | |
| <Button Grid.Column="2" Content="NEXT >" Style="{StaticResource prevNextNavigationButton}" | |
| Visibility="{Binding IsNextButtonVisible, Converter={StaticResource booleanToVisibilityConverter}}" | |
| Command="{Binding NextCommand}" /> | |
| </Grid> | |
| </Border> | |
| </Grid> | |
| </Grid> | |
| </Border> | |
| <TextBlock Text="Loading book..." HorizontalAlignment="Center" VerticalAlignment="Center" | |
| Visibility="{Binding IsLoading, Converter={StaticResource booleanToVisibilityConverter}}" /> | |
| </Grid> | |
| </Window> | |