HomePageInsertDialog.xaml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  14. mc:Ignorable="d">
  15. <cus:DialogContent Header="插入">
  16. <cus:DialogContent.Content>
  17. <Grid Grid.Row="1">
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="329"></RowDefinition>
  20. </Grid.RowDefinitions>
  21. <Grid Grid.Row="0">
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="212"/>
  24. <ColumnDefinition Width="4*"/>
  25. </Grid.ColumnDefinitions>
  26. <Grid Grid.Column="0">
  27. <cus:PageTurningPreview x:Name="InsertPreview" Loaded="PageTurningPreview_Loaded"></cus:PageTurningPreview>
  28. </Grid>
  29. <Grid Grid.Column="1" Margin="7,27,13,40">
  30. <Grid.RowDefinitions>
  31. <RowDefinition></RowDefinition>
  32. <RowDefinition></RowDefinition>
  33. <RowDefinition></RowDefinition>
  34. </Grid.RowDefinitions>
  35. <StackPanel Grid.Row="0" Orientation="Vertical">
  36. <TextBlock Text="插入文件"></TextBlock>
  37. <StackPanel Orientation="Horizontal">
  38. <TextBox Height="32" Width="198" Margin="0,0,4,0" VerticalContentAlignment="Center" Text="{Binding SelectFilePath}" Padding="16,0,6,0"></TextBox>
  39. <Button Height="32" Width="56" Content="选择" Command="{Binding SelectFileCommand}"></Button>
  40. </StackPanel>
  41. </StackPanel>
  42. <Grid Grid.Row="1"></Grid>
  43. <StackPanel Grid.Row="1" Orientation="Vertical">
  44. <TextBlock Text="插入位置" Height="22" Width="56" HorizontalAlignment="Left"></TextBlock>
  45. <StackPanel Orientation="Horizontal" Margin="0,12,0,0">
  46. <RadioButton x:Name="FirstIsCheckRadioButton" Margin="0,0,64,0" IsChecked="{Binding FirstIsCheck}" Command="{Binding FirstPageCommand}">
  47. <TextBlock Text="第一页" Margin="12,0,0,0"></TextBlock>
  48. </RadioButton>
  49. <RadioButton x:Name="LastIsCheckRadioButton" IsChecked="{Binding LastIsCheck}" Command="{Binding LastPageCommand}">
  50. <TextBlock Text="最后一页" Margin="12,0,0,0"></TextBlock>
  51. </RadioButton>
  52. </StackPanel>
  53. </StackPanel>
  54. <StackPanel Grid.Row="2" Orientation="Vertical">
  55. <StackPanel Orientation="Horizontal">
  56. <RadioButton x:Name="CustomIsCheckRadioButton" VerticalAlignment="Center" IsChecked="{Binding CustomIsCheck}" Command="{Binding CustomPageCommand}"></RadioButton>
  57. <TextBlock Text="页面" VerticalAlignment="Center" Margin="12,0,0,0"></TextBlock>
  58. <TextBox Name="PageInsertIndexTextBox" Height="32" Width="100" Text="{Binding PageInsertIndex}" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="CountTextBox_PreviewTextInput" IsEnabled="{Binding CustomIsEnabled}" TextChanged="PageInsertIndexTextBox_TextChanged"></TextBox>
  59. <TextBlock Text="/" VerticalAlignment="Center"></TextBlock>
  60. <TextBlock Name="PageCountText" Text="{Binding PageNumber}" VerticalAlignment="Center"></TextBlock>
  61. </StackPanel>
  62. <ComboBox Margin="28,7,13,0" Height="32" SelectedIndex="{Binding PageLocation}">
  63. <ComboBoxItem Content="之后"></ComboBoxItem>
  64. <ComboBoxItem Content="之前"></ComboBoxItem>
  65. </ComboBox>
  66. </StackPanel>
  67. </Grid>
  68. </Grid>
  69. </Grid>
  70. </cus:DialogContent.Content>
  71. <cus:DialogContent.BottmBar>
  72. <Grid>
  73. <Button
  74. Width="98"
  75. Height="32"
  76. Margin="16,0"
  77. HorizontalAlignment="Right"
  78. Command="{Binding CancelCommand}"
  79. Content="取消" />
  80. <Button
  81. Width="98"
  82. Height="32"
  83. Margin="124,0"
  84. HorizontalAlignment="Right"
  85. Command="{Binding InsertCommand}"
  86. Content="插入" />
  87. </Grid>
  88. </cus:DialogContent.BottmBar>
  89. </cus:DialogContent>
  90. </UserControl>