RecentFilesControl.xaml 1.5 KB

12345678910111213141516171819202122232425262728
  1. <UserControl x:Class="Compdfkit_Tools.PDFControl.RecentFilesControl"
  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.PDFControl"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800" Background="AliceBlue">
  9. <UserControl.Resources>
  10. <Style TargetType="ListBox" x:Key="HistoryListBoxStyle">
  11. <Setter Property="BorderThickness" Value="0" />
  12. <Setter Property="BorderBrush" Value="Transparent" />
  13. <Setter Property="Padding" Value="0" />
  14. </Style>
  15. </UserControl.Resources>
  16. <Grid>
  17. <ListBox x:Name="HistoryListBox" Style="{StaticResource HistoryListBoxStyle}" ItemsSource="{Binding History}" d:ItemsSource="{d:SampleData ItemCount=10}" SelectionMode="Single">
  18. <ListBox.ItemTemplate>
  19. <DataTemplate>
  20. <StackPanel Orientation="Horizontal">
  21. <TextBlock Text="{Binding FilePath}" Margin="0,0,20,0"/>
  22. <TextBlock Text="{Binding FileSize}" />
  23. </StackPanel>
  24. </DataTemplate>
  25. </ListBox.ItemTemplate>
  26. </ListBox>
  27. </Grid>
  28. </UserControl>