AddAnnotationDialog.xaml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <UserControl
  2. x:Class="PDF_Master.Views.Dialog.BOTA.AddAnnotationDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:convert="clr-namespace:PDF_Master.DataConvert"
  6. xmlns:customControl="clr-namespace:PDF_Master.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:dialogBOTA="clr-namespace:PDF_Master.ViewModels.Dialog.BOTA"
  9. xmlns:helper="clr-namespace:PDF_Master.Helper"
  10. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  11. xmlns:local="clr-namespace:PDF_Master.Views.Dialog.BOTA"
  12. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  13. xmlns:prism="http://prismlibrary.com/"
  14. Width="320"
  15. MinHeight="144"
  16. d:DataContext="{d:DesignInstance Type=dialogBOTA:AddAnnotationDialogViewModel}"
  17. prism:Dialog.WindowStyle="{StaticResource Caption16DialogWindowStyle}"
  18. prism:ViewModelLocator.AutoWireViewModel="True"
  19. Background="{StaticResource color.sys.layout.anti}"
  20. mc:Ignorable="d">
  21. <UserControl.Resources>
  22. <SolidColorBrush x:Key="path.fill" Color="#273C62" />
  23. <convert:ObjectConvert x:Key="ObjectConvert" />
  24. </UserControl.Resources>
  25. <StackPanel >
  26. <TextBox
  27. Name="TxtInput"
  28. Width="288"
  29. MinHeight="64"
  30. Margin="16,16,16,0"
  31. Padding="5"
  32. HorizontalContentAlignment="Left"
  33. VerticalContentAlignment="Center"
  34. GotFocus="TxtInput_GotFocus"
  35. Style="{StaticResource TextBoxStyleRadius}"
  36. Text="{Binding ContentText}"
  37. TextWrapping="Wrap">
  38. <i:Interaction.Triggers>
  39. <i:EventTrigger EventName="LostFocus">
  40. <helper:AdvancedInvokeCommandAction
  41. Command="{Binding LostFocusCommand}"
  42. CommandParameter="{Binding ElementName=TxtInput}"
  43. PassEventArgsToCommand="True" />
  44. </i:EventTrigger>
  45. <i:EventTrigger EventName="KeyDown">
  46. <helper:AdvancedInvokeCommandAction
  47. Command="{Binding KeyDownCommand}"
  48. CommandParameter="{Binding ElementName=TxtInput}"
  49. PassEventArgsToCommand="True" />
  50. </i:EventTrigger>
  51. </i:Interaction.Triggers>
  52. </TextBox>
  53. <TextBlock
  54. Name="TxtTip"
  55. Width="90"
  56. Margin="30,-80,20,21"
  57. HorizontalAlignment="Left"
  58. VerticalAlignment="Center"
  59. Foreground="#666666"
  60. GotFocus="TxtTip_GotFocus" PreviewMouseLeftButtonDown="TxtTip_PreviewMouseDown"
  61. Text="请添加附注内容"
  62. Visibility="{Binding TipVisibility}" />
  63. <!--<customControl:TextBoxEx
  64. x:Name="TxtInput"
  65. Width="288"
  66. MinHeight="64"
  67. Margin="16,16,16,0"
  68. Padding="5"
  69. HorizontalContentAlignment="Left"
  70. VerticalContentAlignment="Center"
  71. FontSize="12"
  72. PlaceholderText="请添加附注内容"
  73. ShowClose="False"
  74. ShowTip="True"
  75. ShowTipText="Visible"
  76. TextWrapping="Wrap"
  77. TipText="请添加附注内容">
  78. <i:Interaction.Triggers>
  79. <i:EventTrigger EventName="LostFocus">
  80. <helper:AdvancedInvokeCommandAction
  81. Command="{Binding LostFocusCommand}"
  82. CommandParameter="{Binding ElementName=TxtInput}"
  83. PassEventArgsToCommand="True" />
  84. </i:EventTrigger>
  85. </i:Interaction.Triggers>
  86. </customControl:TextBoxEx>-->
  87. <WrapPanel Margin="128,16,0,16">
  88. <Button
  89. Width="80"
  90. Height="32"
  91. Margin="0,0,0,0"
  92. HorizontalAlignment="Left"
  93. Command="{Binding CreateCommnad}"
  94. Content="确定"
  95. Style="{StaticResource Btn.cta}" />
  96. <Button
  97. Width="80"
  98. Height="32"
  99. Margin="16,0,0,0"
  100. HorizontalAlignment="Right"
  101. Command="{Binding CancelCommand}"
  102. Content="取消"
  103. Style="{StaticResource Btn.cta}" />
  104. </WrapPanel>
  105. </StackPanel>
  106. </UserControl>