AddAnnotationDialog.xaml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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="432"
  15. Height="222"
  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 Margin="16,0">
  26. <TextBlock
  27. Margin="0,13"
  28. FontFamily="Segoe UI"
  29. FontSize="16"
  30. FontWeight="SemiBold"
  31. Text="Add Note" />
  32. <customControl:TextBoxEx
  33. x:Name="TxtInput"
  34. Width="400"
  35. Height="108"
  36. HorizontalContentAlignment="Left"
  37. VerticalContentAlignment="Center"
  38. AcceptsReturn="True"
  39. FontSize="14"
  40. PlaceholderText="{Binding PlaceHolderText}"
  41. ShowClose="False"
  42. Text="{Binding ContentText}"
  43. TextWrapping="Wrap"
  44. VerticalScrollBarVisibility="Auto">
  45. <i:Interaction.Triggers>
  46. <i:EventTrigger EventName="LostFocus">
  47. <helper:AdvancedInvokeCommandAction
  48. Command="{Binding LostFocusCommand}"
  49. CommandParameter="{Binding ElementName=TxtInput}"
  50. PassEventArgsToCommand="True" />
  51. </i:EventTrigger>
  52. <i:EventTrigger EventName="KeyDown">
  53. <helper:AdvancedInvokeCommandAction
  54. Command="{Binding KeyDownCommand}"
  55. CommandParameter="{Binding ElementName=TxtInput}"
  56. PassEventArgsToCommand="True" />
  57. </i:EventTrigger>
  58. </i:Interaction.Triggers>
  59. </customControl:TextBoxEx>
  60. <!--<TextBlock
  61. Name="TxtTip"
  62. Width="90"
  63. Margin="0,-80,20,21"
  64. HorizontalAlignment="Left"
  65. VerticalAlignment="Center"
  66. Foreground="#666666"
  67. GotFocus="TxtTip_GotFocus"
  68. PreviewMouseLeftButtonDown="TxtTip_PreviewMouseDown"
  69. Text="请添加附注内容"
  70. Visibility="{Binding TipVisibility}" />-->
  71. <!--<customControl:TextBoxEx
  72. x:Name="TxtInput"
  73. Width="288"
  74. MinHeight="64"
  75. Margin="16,16,16,0"
  76. Padding="5"
  77. HorizontalContentAlignment="Left"
  78. VerticalContentAlignment="Center"
  79. FontSize="12"
  80. PlaceholderText="请添加附注内容"
  81. ShowClose="False"
  82. ShowTip="True"
  83. ShowTipText="Visible"
  84. TextWrapping="Wrap"
  85. TipText="请添加附注内容">
  86. <i:Interaction.Triggers>
  87. <i:EventTrigger EventName="LostFocus">
  88. <helper:AdvancedInvokeCommandAction
  89. Command="{Binding LostFocusCommand}"
  90. CommandParameter="{Binding ElementName=TxtInput}"
  91. PassEventArgsToCommand="True" />
  92. </i:EventTrigger>
  93. </i:Interaction.Triggers>
  94. </customControl:TextBoxEx>-->
  95. <WrapPanel Margin="0,13,0,0" HorizontalAlignment="Right">
  96. <Button
  97. Width="80"
  98. Height="32"
  99. Margin="0,0,0,0"
  100. HorizontalAlignment="Left"
  101. Command="{Binding CreateCommnad}"
  102. Content="{Binding BtnOKContent}"
  103. Style="{StaticResource Btn.cta}" />
  104. <Button
  105. Width="80"
  106. Height="32"
  107. Margin="16,0,0,0"
  108. HorizontalAlignment="Right"
  109. Command="{Binding CancelCommand}"
  110. Content="{Binding BtnCancelContent}"
  111. Style="{StaticResource btn.sec}" />
  112. </WrapPanel>
  113. </StackPanel>
  114. </UserControl>