HomePageBackgroundCreateFileContent.xaml 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageBackground.HomePageBackgroundCreateFileContent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. prism:ViewModelLocator.AutoWireViewModel="True"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:cus="clr-namespace:PDF_Office.CustomControl" xmlns:background="clr-namespace:PDF_Office.ViewModels.EditTools.Background" d:DataContext="{d:DesignInstance Type=background:BackgroundCreateFileContentViewModel}"
  8. mc:Ignorable="d"
  9. d:DesignHeight="632"
  10. d:DesignWidth="260">
  11. <UserControl.Resources>
  12. <ResourceDictionary>
  13. <ResourceDictionary.MergedDictionaries>
  14. <ResourceDictionary Source="../../../../../Styles/CheckBoxStyle.xaml"/>
  15. </ResourceDictionary.MergedDictionaries>
  16. </ResourceDictionary>
  17. </UserControl.Resources>
  18. <Grid Margin="16,0,0,0">
  19. <Grid.ColumnDefinitions>
  20. <ColumnDefinition Width="58*"/>
  21. <ColumnDefinition Width="3*"/>
  22. </Grid.ColumnDefinitions>
  23. <Grid.RowDefinitions>
  24. <RowDefinition Height="48"></RowDefinition>
  25. <RowDefinition Height="423"></RowDefinition>
  26. <RowDefinition></RowDefinition>
  27. </Grid.RowDefinitions>
  28. <Grid Grid.Row="0" Grid.ColumnSpan="2">
  29. <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom">
  30. <TextBox Height="32" Width="189" Margin="0,0,7,0" IsReadOnly="True" Text="{Binding FileNameText}" FontSize="14" VerticalAlignment="Center"></TextBox>
  31. <Button Height="32" Width="32" Command="{Binding OpenFileCommand}"></Button>
  32. </StackPanel>
  33. </Grid>
  34. <Grid Grid.Row="1" Visibility="{Binding CreateModFileVisible}" Grid.ColumnSpan="2">
  35. <Grid.RowDefinitions>
  36. <RowDefinition Height="157"></RowDefinition>
  37. <RowDefinition Height="163"></RowDefinition>
  38. <RowDefinition Height="103"></RowDefinition>
  39. <RowDefinition></RowDefinition>
  40. </Grid.RowDefinitions>
  41. <Grid Grid.Row="0">
  42. <StackPanel Orientation="Vertical">
  43. <TextBlock Text="外观" Margin="0,16,0,8" Foreground="#666666"></TextBlock>
  44. <StackPanel Orientation="Horizontal">
  45. <TextBlock Height="24" Width="24" Background= "Bisque" Margin="0,0,8,0"></TextBlock>
  46. <cus:CommonWritableComboBox HorizontalAlignment="Left" Width="66" Height="32" Margin="0,0,28,0" TypeSouce="{Binding RotationList, Mode=TwoWay}" Text="{Binding RotationText,Mode=TwoWay}" Value="{Binding RotationValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
  47. <TextBlock Height="24" Width="24" Background="CadetBlue" Margin="0,0,8,0"></TextBlock>
  48. <cus:CommonWritableComboBox HorizontalAlignment="Left" Width="66" Height="32" Margin="0,0,28,0" TypeSouce="{Binding OpacityList, Mode=TwoWay}" Maximum="100" Text="{Binding OpacityText,Mode=TwoWay}" Value="{Binding OpacityValue,Mode=TwoWay}"></cus:CommonWritableComboBox>
  49. </StackPanel>
  50. <StackPanel Orientation="Horizontal"></StackPanel>
  51. <Grid Margin="0,19,0,0">
  52. <CheckBox Name="RelativeScaleCheckBox" Grid.Column="0" Style="{StaticResource EditToolsCheckBoxStyle}" Content="相对目标页面的比例" Margin="0,0,0,0" Height="22" IsChecked="{Binding IsRelativeScaleValue}"></CheckBox>
  53. </Grid>
  54. <cus:CommonWritableComboBox HorizontalAlignment="Left" Width="66" Height="32" Margin="0,11,28,0" TypeSouce="{Binding RelativeRatioList, Mode=TwoWay}" Value="{Binding RelativeRatioValue,Mode=TwoWay}" Text="{Binding RelativeScaleText,Mode=TwoWay}" IsEnabled="{Binding ElementName=RelativeScaleCheckBox,Path=IsChecked}"></cus:CommonWritableComboBox>
  55. </StackPanel>
  56. </Grid>
  57. <Grid Grid.Row="1" Margin="0,16,0,0" VerticalAlignment="Bottom">
  58. <Grid.ColumnDefinitions>
  59. <ColumnDefinition Width="3*"/>
  60. <ColumnDefinition Width="241*"/>
  61. </Grid.ColumnDefinitions>
  62. <StackPanel Grid.ColumnSpan="2">
  63. <TextBlock Text="位置" FontSize="12" Foreground="#666666" Height="20" Width="24" HorizontalAlignment="Left"></TextBlock>
  64. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  65. <Grid Width="74" Height="74">
  66. <Grid.ColumnDefinitions>
  67. <ColumnDefinition></ColumnDefinition>
  68. <ColumnDefinition></ColumnDefinition>
  69. <ColumnDefinition></ColumnDefinition>
  70. </Grid.ColumnDefinitions>
  71. <Grid.RowDefinitions>
  72. <RowDefinition></RowDefinition>
  73. <RowDefinition></RowDefinition>
  74. <RowDefinition></RowDefinition>
  75. </Grid.RowDefinitions>
  76. <Button Grid.Column="0" Grid.Row="0" Tag="0" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" IsEnabled="{Binding GetLocationFromNumber[0],Mode=TwoWay}"></Button>
  77. <Button Grid.Column="1" Grid.Row="0" Tag="1" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" IsEnabled="{Binding GetLocationFromNumber[1], Mode=TwoWay}"></Button>
  78. <Button Grid.Column="2" Grid.Row="0" Tag="2" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" IsEnabled="{Binding GetLocationFromNumber[2], Mode=TwoWay}"></Button>
  79. <Button Grid.Column="0" Grid.Row="1" Tag="10" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" IsEnabled="{Binding GetLocationFromNumber[10], Mode=TwoWay}"></Button>
  80. <Button Grid.Column="1" Grid.Row="1" Tag="11" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" IsEnabled="{Binding GetLocationFromNumber[11], Mode=TwoWay}"></Button>
  81. <Button Grid.Column="2" Grid.Row="1" Tag="12" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" IsEnabled="{Binding GetLocationFromNumber[12], Mode=TwoWay}"></Button>
  82. <Button Grid.Column="0" Grid.Row="2" Tag="20" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" IsEnabled="{Binding GetLocationFromNumber[20], Mode=TwoWay}"></Button>
  83. <Button Grid.Column="1" Grid.Row="2" Tag="21" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" IsEnabled="{Binding GetLocationFromNumber[21], Mode=TwoWay}"></Button>
  84. <Button Grid.Column="2" Grid.Row="2" Tag="22" Command="{Binding ChangeLocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" IsEnabled="{Binding GetLocationFromNumber[22], Mode=TwoWay}"></Button>
  85. </Grid>
  86. <StackPanel Orientation="Vertical" Margin="70,0,0,0">
  87. <StackPanel Orientation="Horizontal">
  88. <TextBlock Text="X" Width="9" Height="20" VerticalAlignment="Center"/>
  89. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding HorizontalOffsetValue, Mode=TwoWay}"></cus:NumericUpDown>
  90. </StackPanel>
  91. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  92. <TextBlock Text="Y" Width="9" Height="20" VerticalAlignment="Center"/>
  93. <cus:NumericUpDown Width="66" Height="32" Margin="9,0,0,0" Text="{Binding VerticalOffsetValue, Mode=TwoWay}"></cus:NumericUpDown>
  94. </StackPanel>
  95. </StackPanel>
  96. </StackPanel>
  97. </StackPanel>
  98. </Grid>
  99. <Grid Grid.Row="2" Margin="0,16,0,0" VerticalAlignment="Bottom">
  100. <StackPanel Orientation="Vertical">
  101. <TextBlock Text="页面范围" FontSize="12" Foreground="#666666" Height="20" Width="48" HorizontalAlignment="Left"></TextBlock>
  102. <cus:WritableComboBox Height="32" Width="228" Margin="0,8,0,0" HorizontalAlignment="Left" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" MaxPageRange="9999"></cus:WritableComboBox>
  103. </StackPanel>
  104. </Grid>
  105. </Grid>
  106. </Grid>
  107. </UserControl>