CPdfThumbnailUI.xaml 1.8 KB

1234567891011121314151617181920212223242526272829303132
  1. <UserControl x:Class="compdfkit_tools.PDFControlUI.CPDFThumbnailUI"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:compdfkit_tools.PDFControlUI"
  7. xmlns:wpftk="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <Grid>
  11. <ListBox Name="ThumbListBox" SelectionChanged="ThumbListBox_SelectionChanged" SelectionMode="Single" ScrollViewer.ScrollChanged="ThumbListBox_ScrollChanged" >
  12. <ListBox.ItemsPanel>
  13. <ItemsPanelTemplate>
  14. <wpftk:VirtualizingWrapPanel></wpftk:VirtualizingWrapPanel>
  15. </ItemsPanelTemplate>
  16. </ListBox.ItemsPanel>
  17. <ListBox.ItemTemplate>
  18. <DataTemplate>
  19. <StackPanel>
  20. <Viewbox Margin="0,5,0,0" Stretch="Uniform" Width="{Binding ThumbnailWidth}" Height="{Binding ThumbnailHeight}">
  21. <Border BorderThickness="2" BorderBrush="Black">
  22. <Image Source="{Binding Path=ImageData.Source}" Margin="0,0,5,0" Width="{Binding ImageWidth}" Height="{Binding ImageHeight}"></Image>
  23. </Border>
  24. </Viewbox>
  25. <TextBlock Text="{Binding ShowPageText}" HorizontalAlignment="Center"></TextBlock>
  26. </StackPanel>
  27. </DataTemplate>
  28. </ListBox.ItemTemplate>
  29. </ListBox>
  30. </Grid>
  31. </UserControl>