HomePageInsertDialog.xaml 5.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageInsertDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:prism="http://prismlibrary.com/"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. Height="441"
  10. Width="600"
  11. d:DesignHeight="441"
  12. d:DesignWidth="600"
  13. mc:Ignorable="d">
  14. <Grid>
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="48"></RowDefinition>
  17. <RowDefinition Height="*"></RowDefinition>
  18. <RowDefinition Height="64"></RowDefinition>
  19. </Grid.RowDefinitions>
  20. <TextBlock Grid.Row="0" Text="插入" FontSize="20" FontWeight="ExtraBlack" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0" Height="28" Width="120"/>
  21. <Border Grid.Row="1" BorderBrush="Gray" BorderThickness="0,1,0,1" VerticalAlignment="Center" Height="329">
  22. <Grid>
  23. <Grid.ColumnDefinitions>
  24. <ColumnDefinition Width="212"/>
  25. <ColumnDefinition Width="4*"/>
  26. </Grid.ColumnDefinitions>
  27. <Grid Grid.Column="0">
  28. <cus:PageTurningPreview x:Name="InsertPreview" Loaded="PageTurningPreview_Loaded"></cus:PageTurningPreview>
  29. </Grid>
  30. <Grid Grid.Column="1" Margin="7,27,13,40">
  31. <Grid.RowDefinitions>
  32. <RowDefinition></RowDefinition>
  33. <RowDefinition></RowDefinition>
  34. <RowDefinition></RowDefinition>
  35. </Grid.RowDefinitions>
  36. <StackPanel Grid.Row="0" Orientation="Vertical">
  37. <TextBlock Text="插入文件"></TextBlock>
  38. <StackPanel Orientation="Horizontal">
  39. <TextBox Height="32" Width="198" Margin="0,0,4,0" VerticalContentAlignment="Center" Text="{Binding SelectFilePath}" Padding="16,0,6,0"></TextBox>
  40. <Button Height="32" Width="56" Content="选择" Command="{Binding SelectFileCommand}"></Button>
  41. </StackPanel>
  42. </StackPanel>
  43. <Grid Grid.Row="1"></Grid>
  44. <StackPanel Grid.Row="1" Orientation="Vertical">
  45. <TextBlock Text="插入位置" Height="22" Width="56" HorizontalAlignment="Left"></TextBlock>
  46. <StackPanel Orientation="Horizontal" Margin="0,12,0,0">
  47. <RadioButton x:Name="FirstIsCheckRadioButton" Margin="0,0,64,0" IsChecked="{Binding FirstIsCheck}" Command="{Binding FirstPageCommand}">
  48. <TextBlock Text="第一页" Margin="12,0,0,0"></TextBlock>
  49. </RadioButton>
  50. <RadioButton x:Name="LastIsCheckRadioButton" IsChecked="{Binding LastIsCheck}" Command="{Binding LastPageCommand}">
  51. <TextBlock Text="最后一页" Margin="12,0,0,0"></TextBlock>
  52. </RadioButton>
  53. </StackPanel>
  54. </StackPanel>
  55. <StackPanel Grid.Row="2" Orientation="Vertical">
  56. <StackPanel Orientation="Horizontal">
  57. <RadioButton x:Name="CustomIsCheckRadioButton" VerticalAlignment="Center" IsChecked="{Binding CustomIsCheck}" Command="{Binding CustomPageCommand}"></RadioButton>
  58. <TextBlock Text="页面" VerticalAlignment="Center" Margin="12,0,0,0"></TextBlock>
  59. <TextBox Name="PageInsertIndexTextBox" Height="32" Width="100" Text="{Binding PageInsertIndex}" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="CountTextBox_PreviewTextInput" IsEnabled="{Binding CustomIsEnabled}" TextChanged="PageInsertIndexTextBox_TextChanged"></TextBox>
  60. <TextBlock Text="/" VerticalAlignment="Center"></TextBlock>
  61. <TextBlock Name="PageCountText" Text="{Binding PageNumber}" VerticalAlignment="Center"></TextBlock>
  62. </StackPanel>
  63. <ComboBox Margin="28,7,13,0" Height="32" SelectedIndex="{Binding PageLocation}">
  64. <ComboBoxItem Content="之后"></ComboBoxItem>
  65. <ComboBoxItem Content="之前"></ComboBoxItem>
  66. </ComboBox>
  67. </StackPanel>
  68. </Grid>
  69. </Grid>
  70. </Border>
  71. <Grid Grid.Row="2">
  72. <Button
  73. Width="98"
  74. Height="32"
  75. Margin="16,0"
  76. HorizontalAlignment="Right"
  77. Command="{Binding CancelCommand}"
  78. Content="取消" />
  79. <Button
  80. Width="98"
  81. Height="32"
  82. Margin="124,0"
  83. HorizontalAlignment="Right"
  84. Command="{Binding InsertCommand}"
  85. Content="插入" />
  86. </Grid>
  87. </Grid>
  88. </UserControl>