ScanPropertyPanel.xaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <UserControl x:Class="PDF_Master.Views.PropertyPanel.Scan.ScanPropertyPanel"
  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.PropertyPanel.Scan" xmlns:customcontrol="clr-namespace:PDF_Master.CustomControl" xmlns:scan="clr-namespace:PDF_Master.ViewModels.PropertyPanel.Scan" xmlns:dataconvert="clr-namespace:PDF_Master.DataConvert" d:DataContext="{d:DesignInstance Type=scan:ScanPropertyPanelViewModel}"
  7. mc:Ignorable="d" >
  8. <UserControl.Resources>
  9. <dataconvert:BoolToVisible x:Key="BoolToVisible"/>
  10. </UserControl.Resources>
  11. <Grid>
  12. <StackPanel>
  13. <TextBlock Text="识别文本"/>
  14. <customcontrol:PathRadioButton x:Name="BtnOCR" Command="{Binding UnknownCommand}"
  15. MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6"
  16. HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
  17. <customcontrol:PathRadioButton.Content >
  18. <TextBlock Text="页面识别"/>
  19. </customcontrol:PathRadioButton.Content>
  20. </customcontrol:PathRadioButton>
  21. <customcontrol:PathRadioButton x:Name="BtnArea" Command="{Binding AreaCommand}"
  22. MouseOverBackground="#EDEEF0" MouseDownBackground="#CED0D4" MouseDownBackgroundOpacity="0.6"
  23. HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
  24. <customcontrol:PathRadioButton.Content >
  25. <TextBlock Text="区域识别"/>
  26. </customcontrol:PathRadioButton.Content>
  27. </customcontrol:PathRadioButton>
  28. <TextBlock Text="一个页面只会显示最后一次OCR的结果,不会显示多次结果。" TextWrapping="Wrap" Visibility="{Binding ElementName=BtnArea,Path=IsChecked,Converter={StaticResource BoolToVisible}}" />
  29. <ComboBox SelectedIndex="0">
  30. <TextBlock Text="English"/>
  31. <TextBlock Text="Chinese Simplified"/>
  32. <TextBlock Text="Chinese Traditional"/>
  33. <TextBlock Text="French"/>
  34. </ComboBox>
  35. <customcontrol:WritableComboBox SelectedIndex="0" MaxPageRange="{Binding PageCount}" PageIndexList="{Binding SetPageRange,Mode=TwoWay}"/>
  36. <Button Content="OCR" Command="{Binding OCRCommand}" IsEnabled="{Binding ElementName=BtnOCR,Path=IsChecked}"/>
  37. </StackPanel>
  38. </Grid>
  39. </UserControl>