ScanViwer.xaml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <UserControl x:Class="PDF_Master.Views.Scan.ScanViwer"
  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:PDF_Master.Views.Scan" xmlns:scanviewcontrol="clr-namespace:PDF_Master.CustomControl.ScanViewControl" xmlns:scan="clr-namespace:PDF_Master.ViewModels.Scan" xmlns:customcontrol="clr-namespace:PDF_Master.CustomControl" d:DataContext="{d:DesignInstance Type=scan:ScanViwerViewModel}"
  7. mc:Ignorable="d"
  8. Loaded="UserControl_Loaded"
  9. Unloaded="UserControl_Unloaded"
  10. KeyDown="UserControl_KeyDown"
  11. >
  12. <Grid PreviewMouseWheel="Grid_MouseWheel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="LightGray" MouseLeftButtonUp="BitmapPanel_MouseLeftButtonUp">
  13. <ScrollViewer HorizontalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Auto" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
  14. <Grid x:Name="ImageGrid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="500" Height="500">
  15. <scanviewcontrol:CustomPanel x:Name="BitmapPanel"
  16. BGImage="{Binding BgImage}" OCRTextRectList="{Binding TextRectList}" IsShowRect="{Binding IsShowRect}"
  17. MouseDown="CustomPanel_MouseDown" MouseLeftButtonDown="BitmapPanel_MouseLeftButtonDown" MouseLeftButtonUp="BitmapPanel_MouseLeftButtonUp" MouseMove="BitmapPanel_MouseMove" MouseRightButtonDown="BitmapPanel_MouseRightButtonDown"/>
  18. <Canvas>
  19. <local:Redress x:Name="RedressControl" Visibility="Collapsed" IsVisibleChanged="RedressControl_IsVisibleChanged" ApplyCommandHandler="RedressControl_ApplyCommandHandler"/>
  20. </Canvas>
  21. </Grid>
  22. </ScrollViewer>
  23. <Grid Width="318" Height="128" Background="{StaticResource color.sys.layout.state.note}" VerticalAlignment="Top" HorizontalAlignment="Right" Visibility="{Binding ShowTooltip}">
  24. <Grid.ColumnDefinitions>
  25. <ColumnDefinition Width="8"/>
  26. <ColumnDefinition Width="*"/>
  27. <ColumnDefinition Width="8"/>
  28. </Grid.ColumnDefinitions>
  29. <Grid.RowDefinitions>
  30. <RowDefinition Height="8"/>
  31. <RowDefinition Height="*"/>
  32. <RowDefinition Height="8"/>
  33. </Grid.RowDefinitions>
  34. <TextBlock Grid.Row="1" Grid.Column="1" Text="增强扫描已完成"/>
  35. <Button Grid.Row="1" Grid.Column="1" Content="取消增强效果" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="50" Height="50" Command="{Binding CancelEnhancedCommand}"/>
  36. <Button Grid.Row="1" Grid.Column="1" Content="取消" HorizontalAlignment="Right" VerticalAlignment="Top" Width="20" Height="20" Command="{Binding CloseTooltipCommand}"/>
  37. </Grid>
  38. </Grid>
  39. </UserControl>