CustomCreateDialog.xaml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.CustomCreateDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:customcontrol="clr-namespace:PDF_Office.CustomControl"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel" xmlns:cus="clr-namespace:PDF_Office.CustomControl" xmlns:annotpanel="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" xmlns:dataconvert="clr-namespace:PDF_Office.DataConvert" d:DataContext="{d:DesignInstance Type=annotpanel:CustomCreateDialogViewModel}"
  8. mc:Ignorable="d" >
  9. <UserControl.Resources>
  10. <PathGeometry x:Key="Ic_AddButtonPath" Figures="M8.5,2.5 L8.5,7.5 L13.5,7.5 L13.5,8.5 L8.5,8.5 L8.5,13.5 L7.5,13.5 L7.5,8.5 L2.5,8.5 L2.5,7.5 L7.5,7.5 L7.5,2.5 L8.5,2.5 Z"/>
  11. <dataconvert:UnVisivleConvert x:Key="UnVisivleConvert"/>
  12. </UserControl.Resources>
  13. <cus:DialogContent Header="新建图章">
  14. <cus:DialogContent.Content>
  15. <TabControl Grid.Row="1" Name="StampTabControl" SelectedIndex="2" HorizontalAlignment="Center" HorizontalContentAlignment="Center" Style="{StaticResource TabControlWithUnderLineStyle}">
  16. <TabItem x:Name="文字图章"
  17. Header="文字图章"
  18. FontFamily="Segoe UI" Foreground="#FF666666"
  19. HorizontalContentAlignment="Center"
  20. FontSize="16"
  21. Height="40"
  22. Width="88"
  23. IsSelected="True">
  24. <Grid>
  25. <Grid.RowDefinitions>
  26. <RowDefinition Height="*"/>
  27. <RowDefinition Height="*"/>
  28. <RowDefinition Height="*"/>
  29. <RowDefinition Height="*"/>
  30. </Grid.RowDefinitions>
  31. <Image Height="50" Source="{Binding TextImageSource}"/>
  32. <TextBox Grid.Row="1" Text="{Binding StampText,Mode=TwoWay}" TextChanged="TextBox_TextChanged">
  33. <i:Interaction.Triggers>
  34. <i:EventTrigger EventName="LostFocus">
  35. <i:InvokeCommandAction Command="{Binding UpDataDynamicCommnad}" PassEventArgsToCommand="True" />
  36. </i:EventTrigger>
  37. <i:EventTrigger EventName="KeyDown">
  38. <i:InvokeCommandAction Command="{Binding KeyDown}" PassEventArgsToCommand="True" />
  39. </i:EventTrigger>
  40. </i:Interaction.Triggers>
  41. </TextBox>
  42. <Grid Grid.Row="2">
  43. <StackPanel Orientation="Horizontal">
  44. <RadioButton Tag="1" Checked="RadioButton_Checked"/>
  45. <RadioButton Tag="2" Checked="RadioButton_Checked"/>
  46. <RadioButton Tag="3" Checked="RadioButton_Checked"/>
  47. <RadioButton Tag="4" Checked="RadioButton_Checked"/>
  48. <RadioButton Tag="5" Checked="RadioButton_Checked"/>
  49. <RadioButton Tag="6" Checked="RadioButton_Checked"/>
  50. <RadioButton Tag="7" Checked="RadioButton_Checked"/>
  51. <RadioButton Tag="8" Checked="RadioButton_Checked"/>
  52. <RadioButton Tag="9" Checked="RadioButton_Checked"/>
  53. <RadioButton Tag="10" Checked="RadioButton_Checked"/>
  54. <RadioButton Tag="11" Checked="RadioButton_Checked"/>
  55. </StackPanel>
  56. </Grid>
  57. <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center">
  58. <CheckBox Name="Date" VerticalAlignment="Center" FontFamily="Seoge UI" FontSize="14" Content="Date" Padding="7 0 0 0" IsChecked="{Binding IsCheckedDate,Mode=TwoWay}"/>
  59. <CheckBox Name="Time" VerticalAlignment="Center" FontFamily="Seoge UI" FontSize="14" Content="Time" Padding="7 0 0 0" IsChecked="{Binding IsCheckedTime,Mode=TwoWay}"/>
  60. </StackPanel>
  61. </Grid>
  62. </TabItem>
  63. <TabItem x:Name="图片图章"
  64. Header="图片图章"
  65. FontFamily="Segoe UI" Foreground="#FF666666"
  66. HorizontalContentAlignment="Center"
  67. FontSize="16"
  68. Width="86">
  69. <Grid>
  70. <customcontrol:PathButton
  71. x:Name="BtnAdd"
  72. Height="24" Width="24" IconHeight="20" IconWidth="20"
  73. Icon="{StaticResource Ic_AddButtonPath}" IconFill="Red"
  74. IconPress="{StaticResource Ic_AddButtonPath}" IconPressFill="#C04CF8"
  75. IconMouseOver="{StaticResource Ic_AddButtonPath}" IconMouseOverFill="#C04CF8" Visibility="{Binding ShowImageButton}" Command="{Binding OpenImageCommnad}"/>
  76. <Grid Visibility="{Binding ElementName=BtnAdd,Path=Visibility,Converter={StaticResource UnVisivleConvert}}">
  77. <Grid.RowDefinitions>
  78. <RowDefinition Height="24"/>
  79. <RowDefinition Height="*"/>
  80. </Grid.RowDefinitions>
  81. <Image Grid.RowSpan="2" Width="200" Height="200" Source="{Binding ImagePreviewSource}" />
  82. <customcontrol:PathButton
  83. x:Name="BtnReAdd"
  84. HorizontalAlignment="Right" VerticalAlignment="Top"
  85. Height="24" Width="24" IconHeight="20" IconWidth="20"
  86. Icon="{StaticResource Ic_AddButtonPath}" IconFill="Red"
  87. IconPress="{StaticResource Ic_AddButtonPath}" IconPressFill="#C04CF8"
  88. IconMouseOver="{StaticResource Ic_AddButtonPath}" IconMouseOverFill="#C04CF8" Command="{Binding OpenImageCommnad}"/>
  89. </Grid>
  90. </Grid>
  91. </TabItem>
  92. </TabControl>
  93. </cus:DialogContent.Content>
  94. <cus:DialogContent.BottmBar>
  95. <Grid>
  96. <Grid.ColumnDefinitions>
  97. <ColumnDefinition Width="50*" />
  98. <ColumnDefinition Width="50*" />
  99. </Grid.ColumnDefinitions>
  100. <Button
  101. Grid.Column="0"
  102. Width="150"
  103. Height="32"
  104. Margin="25,0,0,0"
  105. HorizontalAlignment="Left"
  106. Command="{Binding CreateCommnad}"
  107. Content="确定" />
  108. <Button
  109. Grid.Column="1"
  110. Width="150"
  111. Height="32"
  112. Margin="0,0,25,0"
  113. HorizontalAlignment="Right"
  114. Command="{Binding CancelCommand}"
  115. Content="取消" />
  116. </Grid>
  117. </cus:DialogContent.BottmBar>
  118. </cus:DialogContent>
  119. </UserControl>