ScanViwer.xaml 2.8 KB

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