fasdfsa's picture
init
fab29d7
<Window x:Class="VersOne.Epub.WpfDemo.Views.LibraryView"
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 — Library" Height="768" Width="867"
Style="{StaticResource windowStyle}">
<Grid Margin="4">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#CCCCCC" BorderThickness="0,0,0,1">
<StackPanel Orientation="Horizontal" Margin="0,0,0,6">
<Button Padding="8" Command="{Binding AddBookCommand}" Style="{StaticResource whiteButtonStyle}">Add book</Button>
</StackPanel>
</Border>
<ScrollViewer Grid.Row="1" Margin="0,8,0,0" ScrollViewer.VerticalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding Books}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<controls:BookButton Command="{Binding DataContext.OpenBookCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</Window>