AddAnnotationDialog.xaml 4.5 KB

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