SignatureCreateDialog.xaml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. <UserControl
  2. x:Class="PDF_Master.Views.PropertyPanel.AnnotPanel.SignatureCreateDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:annotpanel="clr-namespace:PDF_Master.ViewModels.PropertyPanel.AnnotPanel"
  6. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:dataconvert="clr-namespace:PDF_Master.DataConvert"
  9. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  10. xmlns:local="clr-namespace:PDF_Master.Views.PropertyPanel.AnnotPanel"
  11. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  12. xmlns:prism="http://prismlibrary.com/"
  13. Width="468"
  14. Height="392"
  15. d:DataContext="{d:DesignInstance Type=annotpanel:SignatureCreateDialogViewModel}"
  16. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  17. Loaded="UserControl_Loaded"
  18. mc:Ignorable="d">
  19. <UserControl.Resources>
  20. <Style TargetType="{x:Type TabItem}">
  21. <Setter Property="Width" Value="74.67 " />
  22. <Setter Property="Height" Value="28" />
  23. <Setter Property="BorderThickness" Value="0" />
  24. <Setter Property="Template" Value="{DynamicResource Segmented}" />
  25. </Style>
  26. <dataconvert:UnVisivleConvert x:Key="UnVisivleConvert" />
  27. <dataconvert:IntAndTagToBoolMultiBinding x:Key="IntAndTagToBoolMultiBinding" />
  28. <dataconvert:ListCountAndBoolToVisible x:Key="ListCountAndBoolToVisible" />
  29. <dataconvert:IntToColorBrush x:Key="IntToColorBrush" />
  30. <dataconvert:ListCountToVisible x:Key="ListCountToVisible" />
  31. <dataconvert:CenterToolTipConverter x:Key="CenterToolTipConverter" />
  32. <dataconvert:SignatureButtonConvert x:Key="SignatureButtonConvert" />
  33. <Style x:Key="TriangleToolTipStyle" TargetType="ToolTip">
  34. <Setter Property="Template">
  35. <Setter.Value>
  36. <ControlTemplate>
  37. <StackPanel>
  38. <Path
  39. Margin="0,0,10,0"
  40. HorizontalAlignment="Center"
  41. VerticalAlignment="Center"
  42. Data="M 6 0 L 0 6 L 12 6 Z"
  43. Fill="#E6333333" />
  44. <Border
  45. HorizontalAlignment="Stretch"
  46. VerticalAlignment="Stretch"
  47. Background="#E6333333"
  48. CornerRadius="8">
  49. <TextBlock
  50. Margin="6"
  51. Foreground="White"
  52. LineHeight="20"
  53. Text="{TemplateBinding ContentControl.Content}" />
  54. </Border>
  55. </StackPanel>
  56. </ControlTemplate>
  57. </Setter.Value>
  58. </Setter>
  59. </Style>
  60. </UserControl.Resources>
  61. <cus:DialogContent x:Name="DialogHeader">
  62. <cus:DialogContent.Content>
  63. <TabControl
  64. BorderThickness="0"
  65. SelectedIndex="{Binding TabItemIndex, Mode=TwoWay}"
  66. Style="{StaticResource FormTabControl}">
  67. <TabItem x:Name="InputItem">
  68. <Grid>
  69. <Grid.RowDefinitions>
  70. <RowDefinition Height="*" />
  71. <RowDefinition Height="32" />
  72. </Grid.RowDefinitions>
  73. <Grid.ColumnDefinitions>
  74. <ColumnDefinition Width="16" />
  75. <ColumnDefinition Width="*" />
  76. <ColumnDefinition Width="16" />
  77. </Grid.ColumnDefinitions>
  78. <cus:TextBoxEx
  79. x:Name="InPutTextBox"
  80. Grid.Column="1"
  81. Height="182"
  82. HorizontalContentAlignment="Center"
  83. VerticalContentAlignment="Center"
  84. Background="{StaticResource color.sys.layout.mg}"
  85. FontFamily="{Binding ElementName=TextComBox, Path=SelectedValue, TargetNullValue=Segoe UI}"
  86. FontSize="20"
  87. Foreground="{Binding RadioButtonIndex, Converter={StaticResource IntToColorBrush}}"
  88. PlaceholderText="Input"
  89. ShowClose="False"
  90. Text="{Binding InputText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  91. TextChanged="TextBoxEx_TextChanged" />
  92. <Button
  93. x:Name="BtnTextClear"
  94. Grid.Column="1"
  95. Width="43"
  96. Height="24"
  97. Margin="0,0,8,24"
  98. HorizontalAlignment="Right"
  99. VerticalAlignment="Bottom"
  100. Command="{Binding ClearTextCommnad}"
  101. Style="{StaticResource btn.sec}"
  102. Visibility="{Binding ShowTextButton}" />
  103. <ComboBox
  104. x:Name="TextComBox"
  105. Grid.Row="1"
  106. Grid.Column="1"
  107. Width="200"
  108. HorizontalAlignment="Left"
  109. VerticalContentAlignment="Center"
  110. ItemsSource="{Binding FontNameList}"
  111. SelectedIndex="{Binding FontNameIndex, Mode=TwoWay}" />
  112. <StackPanel
  113. Grid.Row="1"
  114. Grid.Column="1"
  115. HorizontalAlignment="Right"
  116. VerticalAlignment="Center"
  117. Orientation="Horizontal">
  118. <cus:PathRadioButton
  119. Checked="TextRadioButton_Checked"
  120. CornerRadius="4"
  121. MouseDownBackground="#CED0D4"
  122. MouseDownBackgroundOpacity="0.6"
  123. MouseOverBackground="#EDEEF0"
  124. Tag="1">
  125. <cus:PathRadioButton.Content>
  126. <Grid Width="32" Height="32">
  127. <Ellipse
  128. Width="20"
  129. Height="20"
  130. Fill="#252629" />
  131. </Grid>
  132. </cus:PathRadioButton.Content>
  133. <i:Interaction.Triggers>
  134. <i:EventTrigger EventName="Checked">
  135. <i:InvokeCommandAction
  136. Command="{Binding CheckedCommnad}"
  137. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
  138. PassEventArgsToCommand="True" />
  139. </i:EventTrigger>
  140. </i:Interaction.Triggers>
  141. <RadioButton.IsChecked>
  142. <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
  143. <Binding Source="1" />
  144. <Binding Path="RadioButtonIndex" />
  145. </MultiBinding>
  146. </RadioButton.IsChecked>
  147. </cus:PathRadioButton>
  148. <cus:PathRadioButton
  149. Margin="11,0"
  150. Checked="TextRadioButton_Checked"
  151. CornerRadius="4"
  152. MouseDownBackground="#CED0D4"
  153. MouseDownBackgroundOpacity="0.6"
  154. MouseOverBackground="#EDEEF0"
  155. Tag="2">
  156. <cus:PathRadioButton.Content>
  157. <Grid Width="32" Height="32">
  158. <Ellipse
  159. Width="20"
  160. Height="20"
  161. Fill="#F3465B" />
  162. </Grid>
  163. </cus:PathRadioButton.Content>
  164. <i:Interaction.Triggers>
  165. <i:EventTrigger EventName="Checked">
  166. <i:InvokeCommandAction
  167. Command="{Binding CheckedCommnad}"
  168. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
  169. PassEventArgsToCommand="True" />
  170. </i:EventTrigger>
  171. </i:Interaction.Triggers>
  172. <RadioButton.IsChecked>
  173. <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
  174. <Binding Source="2" />
  175. <Binding Path="RadioButtonIndex" />
  176. </MultiBinding>
  177. </RadioButton.IsChecked>
  178. </cus:PathRadioButton>
  179. <cus:PathRadioButton
  180. Checked="TextRadioButton_Checked"
  181. CornerRadius="4"
  182. MouseDownBackground="#CED0D4"
  183. MouseDownBackgroundOpacity="0.6"
  184. MouseOverBackground="#EDEEF0"
  185. Tag="3">
  186. <cus:PathRadioButton.Content>
  187. <Grid Width="32" Height="32">
  188. <Ellipse
  189. Width="20"
  190. Height="20"
  191. Fill="#273C62" />
  192. </Grid>
  193. </cus:PathRadioButton.Content>
  194. <i:Interaction.Triggers>
  195. <i:EventTrigger EventName="Checked">
  196. <i:InvokeCommandAction
  197. Command="{Binding CheckedCommnad}"
  198. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
  199. PassEventArgsToCommand="True" />
  200. </i:EventTrigger>
  201. </i:Interaction.Triggers>
  202. <RadioButton.IsChecked>
  203. <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
  204. <Binding Source="3" />
  205. <Binding Path="RadioButtonIndex" />
  206. </MultiBinding>
  207. </RadioButton.IsChecked>
  208. </cus:PathRadioButton>
  209. <cus:PathRadioButton
  210. Margin="11,0,0,0"
  211. Checked="TextRadioButton_Checked"
  212. CornerRadius="4"
  213. MouseDownBackground="#CED0D4"
  214. MouseDownBackgroundOpacity="0.6"
  215. MouseOverBackground="#EDEEF0"
  216. Tag="4">
  217. <cus:PathRadioButton.Content>
  218. <Grid Width="32" Height="32">
  219. <Ellipse
  220. Width="20"
  221. Height="20"
  222. Fill="#94989C" />
  223. </Grid>
  224. </cus:PathRadioButton.Content>
  225. <i:Interaction.Triggers>
  226. <i:EventTrigger EventName="Checked">
  227. <i:InvokeCommandAction
  228. Command="{Binding CheckedCommnad}"
  229. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
  230. PassEventArgsToCommand="True" />
  231. </i:EventTrigger>
  232. </i:Interaction.Triggers>
  233. <RadioButton.IsChecked>
  234. <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
  235. <Binding Source="4" />
  236. <Binding Path="RadioButtonIndex" />
  237. </MultiBinding>
  238. </RadioButton.IsChecked>
  239. </cus:PathRadioButton>
  240. </StackPanel>
  241. </Grid>
  242. </TabItem>
  243. <TabItem x:Name="DrawItem">
  244. <Grid>
  245. <Grid.RowDefinitions>
  246. <RowDefinition Height="*" />
  247. <RowDefinition Height="32" />
  248. </Grid.RowDefinitions>
  249. <Grid.ColumnDefinitions>
  250. <ColumnDefinition Width="16" />
  251. <ColumnDefinition Width="*" />
  252. <ColumnDefinition Width="16" />
  253. </Grid.ColumnDefinitions>
  254. <Border
  255. Grid.Column="1"
  256. Height="182"
  257. BorderBrush="{StaticResource color.field.border.norm}"
  258. BorderThickness="1"
  259. CornerRadius="4">
  260. <Grid>
  261. <InkCanvas
  262. x:Name="inkCanvas"
  263. Background="{StaticResource color.sys.layout.mg}"
  264. DefaultDrawingAttributes="{Binding DrawingAttributeObject}"
  265. PreviewMouseLeftButtonDown="inkCanvas_MouseLeftButtonDown"
  266. PreviewMouseLeftButtonUp="inkCanvas_MouseLeftButtonUp"
  267. Strokes="{Binding StrokesObject}" />
  268. <Grid
  269. x:Name="PlanGrid"
  270. Background="{StaticResource color.sys.layout.mg}"
  271. IsHitTestVisible="False"
  272. Opacity="0.7">
  273. <Grid.Visibility>
  274. <MultiBinding Converter="{StaticResource ListCountAndBoolToVisible}" Mode="OneWay">
  275. <Binding Path="StrokesObject.Count" />
  276. <Binding Path="IsMouseDown" />
  277. </MultiBinding>
  278. </Grid.Visibility>
  279. <TextBlock
  280. x:Name="DrawHint"
  281. HorizontalAlignment="Center"
  282. VerticalAlignment="Center" />
  283. </Grid>
  284. <Button
  285. x:Name="BtnDrawClear"
  286. Width="43"
  287. Height="24"
  288. Margin="0,0,8,8"
  289. HorizontalAlignment="Right"
  290. VerticalAlignment="Bottom"
  291. Command="{Binding ClearInkCanvasCommnad}"
  292. Style="{StaticResource btn.sec}"
  293. Visibility="{Binding ElementName=PlanGrid, Path=Visibility, Converter={StaticResource UnVisivleConvert}}" />
  294. </Grid>
  295. </Border>
  296. <ComboBox
  297. Grid.Row="1"
  298. Grid.Column="1"
  299. Width="80"
  300. HorizontalAlignment="Left"
  301. VerticalContentAlignment="Center"
  302. ItemsSource="{Binding ThicknessList}"
  303. SelectedIndex="{Binding ThicknessListIndex, Mode=TwoWay}" />
  304. <StackPanel
  305. Grid.Row="1"
  306. Grid.Column="1"
  307. HorizontalAlignment="Right"
  308. VerticalAlignment="Center"
  309. Orientation="Horizontal">
  310. <cus:PathRadioButton
  311. Checked="ImageRadioButton_Checked"
  312. MouseDownBackground="#CED0D4"
  313. MouseDownBackgroundOpacity="0.6"
  314. MouseOverBackground="#EDEEF0"
  315. Tag="1">
  316. <cus:PathRadioButton.Content>
  317. <Grid Width="32" Height="32">
  318. <Ellipse
  319. Width="20"
  320. Height="20"
  321. Fill="#252629" />
  322. </Grid>
  323. </cus:PathRadioButton.Content>
  324. <i:Interaction.Triggers>
  325. <i:EventTrigger EventName="Checked">
  326. <i:InvokeCommandAction
  327. Command="{Binding CheckedCommnad}"
  328. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
  329. PassEventArgsToCommand="True" />
  330. </i:EventTrigger>
  331. </i:Interaction.Triggers>
  332. <RadioButton.IsChecked>
  333. <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
  334. <Binding Source="1" />
  335. <Binding Path="ImageRadioButtonIndex" />
  336. </MultiBinding>
  337. </RadioButton.IsChecked>
  338. </cus:PathRadioButton>
  339. <cus:PathRadioButton
  340. Checked="ImageRadioButton_Checked"
  341. MouseDownBackground="#CED0D4"
  342. MouseDownBackgroundOpacity="0.6"
  343. MouseOverBackground="#EDEEF0"
  344. Tag="2">
  345. <cus:PathRadioButton.Content>
  346. <Grid Width="32" Height="32">
  347. <Ellipse
  348. Width="20"
  349. Height="20"
  350. Fill="#FC1F1F" />
  351. </Grid>
  352. </cus:PathRadioButton.Content>
  353. <i:Interaction.Triggers>
  354. <i:EventTrigger EventName="Checked">
  355. <i:InvokeCommandAction
  356. Command="{Binding CheckedCommnad}"
  357. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
  358. PassEventArgsToCommand="True" />
  359. </i:EventTrigger>
  360. </i:Interaction.Triggers>
  361. <RadioButton.IsChecked>
  362. <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
  363. <Binding Source="2" />
  364. <Binding Path="ImageRadioButtonIndex" />
  365. </MultiBinding>
  366. </RadioButton.IsChecked>
  367. </cus:PathRadioButton>
  368. <cus:PathRadioButton
  369. Checked="ImageRadioButton_Checked"
  370. MouseDownBackground="#CED0D4"
  371. MouseDownBackgroundOpacity="0.6"
  372. MouseOverBackground="#EDEEF0"
  373. Tag="3">
  374. <cus:PathRadioButton.Content>
  375. <Grid Width="32" Height="32">
  376. <Ellipse
  377. Width="20"
  378. Height="20"
  379. Fill="#273C62" />
  380. </Grid>
  381. </cus:PathRadioButton.Content>
  382. <i:Interaction.Triggers>
  383. <i:EventTrigger EventName="Checked">
  384. <i:InvokeCommandAction
  385. Command="{Binding CheckedCommnad}"
  386. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
  387. PassEventArgsToCommand="True" />
  388. </i:EventTrigger>
  389. </i:Interaction.Triggers>
  390. <RadioButton.IsChecked>
  391. <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
  392. <Binding Source="3" />
  393. <Binding Path="ImageRadioButtonIndex" />
  394. </MultiBinding>
  395. </RadioButton.IsChecked>
  396. </cus:PathRadioButton>
  397. <cus:PathRadioButton
  398. Checked="ImageRadioButton_Checked"
  399. MouseDownBackground="#CED0D4"
  400. MouseDownBackgroundOpacity="0.6"
  401. MouseOverBackground="#EDEEF0"
  402. Tag="4">
  403. <cus:PathRadioButton.Content>
  404. <Grid Width="32" Height="32">
  405. <Ellipse
  406. Width="20"
  407. Height="20"
  408. Fill="#94989C" />
  409. </Grid>
  410. </cus:PathRadioButton.Content>
  411. <i:Interaction.Triggers>
  412. <i:EventTrigger EventName="Checked">
  413. <i:InvokeCommandAction
  414. Command="{Binding CheckedCommnad}"
  415. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RadioButton}, Path=Tag}"
  416. PassEventArgsToCommand="True" />
  417. </i:EventTrigger>
  418. </i:Interaction.Triggers>
  419. <RadioButton.IsChecked>
  420. <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
  421. <Binding Source="4" />
  422. <Binding Path="ImageRadioButtonIndex" />
  423. </MultiBinding>
  424. </RadioButton.IsChecked>
  425. </cus:PathRadioButton>
  426. </StackPanel>
  427. </Grid>
  428. </TabItem>
  429. <TabItem x:Name="PictureItem">
  430. <Grid>
  431. <Grid.RowDefinitions>
  432. <RowDefinition Height="*" />
  433. <RowDefinition Height="32" />
  434. </Grid.RowDefinitions>
  435. <Grid.ColumnDefinitions>
  436. <ColumnDefinition Width="16" />
  437. <ColumnDefinition Width="*" />
  438. <ColumnDefinition Width="16" />
  439. </Grid.ColumnDefinitions>
  440. <Border
  441. Grid.Column="1"
  442. Height="182"
  443. BorderBrush="{StaticResource color.field.border.norm}"
  444. BorderThickness="1"
  445. CornerRadius="4">
  446. <Grid Background="{StaticResource color.sys.layout.mg}">
  447. <StackPanel
  448. x:Name="AddStackPanel"
  449. HorizontalAlignment="Center"
  450. VerticalAlignment="Center"
  451. Visibility="{Binding ShowImageButton}">
  452. <cus:ImageButton
  453. Width="128"
  454. Height="128"
  455. Command="{Binding OpenImageCommnad}"
  456. Icon="pack://application:,,,/PDF Master;component/Resources/Dialog/AddImage.png"
  457. IconHeight="128"
  458. IconMouseOver="pack://application:,,,/PDF Master;component/Resources/Dialog/AddImageSuspend.png"
  459. IconPress="pack://application:,,,/PDF Master;component/Resources/Dialog/AddImageSuspend.png"
  460. IconWidth="128" />
  461. <TextBlock
  462. x:Name="ImageHint"
  463. HorizontalAlignment="Center"
  464. VerticalAlignment="Center"
  465. FontFamily="Segoe UI"
  466. FontSize="14"
  467. FontWeight="Regular"
  468. Foreground="{StaticResource color.sys.text.neutral.lv3}" />
  469. </StackPanel>
  470. <Grid Visibility="{Binding ElementName=AddStackPanel, Path=Visibility, Converter={StaticResource UnVisivleConvert}}">
  471. <Grid.RowDefinitions>
  472. <RowDefinition Height="24" />
  473. <RowDefinition Height="*" />
  474. </Grid.RowDefinitions>
  475. <Image
  476. Grid.RowSpan="2"
  477. Width="200"
  478. Height="200"
  479. Source="{Binding ImagePreviewSource}" />
  480. <Button
  481. x:Name="BtnPictureReselect"
  482. Grid.Row="1"
  483. Width="60"
  484. Height="24"
  485. Margin="0,0,8,8"
  486. HorizontalAlignment="Right"
  487. VerticalAlignment="Bottom"
  488. Command="{Binding OpenImageCommnad}"
  489. Style="{StaticResource btn.sec}" />
  490. </Grid>
  491. </Grid>
  492. </Border>
  493. <StackPanel
  494. Grid.Row="1"
  495. Grid.Column="1"
  496. HorizontalAlignment="Center"
  497. Orientation="Horizontal">
  498. <CheckBox
  499. Width="20"
  500. Height="20"
  501. IsChecked="{Binding IsRemoveBackground}" />
  502. <TextBlock
  503. x:Name="BtnReBkg"
  504. HorizontalAlignment="Center"
  505. VerticalAlignment="Center"
  506. FontFamily="Segoe UI"
  507. FontSize="14" />
  508. <cus:ImageButton
  509. Width="16"
  510. Height="16"
  511. Margin="8,0,0,0"
  512. Icon="pack://application:,,,/PDF Master;component/Resources/Dialog/help.png"
  513. IconHeight="16"
  514. IconMouseOver="pack://application:,,,/PDF Master;component/Resources/Dialog/helphover.png"
  515. IconPress="pack://application:,,,/PDF Master;component/Resources/Dialog/help.png"
  516. IconWidth="16">
  517. <cus:ImageButton.ToolTip>
  518. <ToolTip
  519. x:Name="BtnReBkgHint"
  520. Placement="Bottom"
  521. Style="{StaticResource TriangleToolTipStyle}">
  522. <ToolTip.HorizontalOffset>
  523. <MultiBinding Converter="{StaticResource CenterToolTipConverter}">
  524. <Binding Path="PlacementTarget.ActualWidth" RelativeSource="{RelativeSource Self}" />
  525. <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
  526. </MultiBinding>
  527. </ToolTip.HorizontalOffset>
  528. </ToolTip>
  529. </cus:ImageButton.ToolTip>
  530. </cus:ImageButton>
  531. </StackPanel>
  532. </Grid>
  533. </TabItem>
  534. </TabControl>
  535. </cus:DialogContent.Content>
  536. <cus:DialogContent.BottmBar>
  537. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  538. <Button
  539. x:Name="BtnOK"
  540. Grid.Column="0"
  541. Width="80"
  542. Height="32"
  543. HorizontalAlignment="Right"
  544. Command="{Binding CreateCommnad}"
  545. Style="{StaticResource Btn.cta}">
  546. <Button.IsEnabled>
  547. <MultiBinding Converter="{StaticResource SignatureButtonConvert}" Mode="OneWay">
  548. <Binding Path="TabItemIndex" />
  549. <Binding Path="InputText" />
  550. <Binding Path="StrokesObject.Count" />
  551. <Binding Path="ImagePreviewSource" />
  552. </MultiBinding>
  553. </Button.IsEnabled>
  554. </Button>
  555. <Button
  556. x:Name="BtnNo"
  557. Grid.Column="2"
  558. Width="80"
  559. Height="32"
  560. Margin="16,0,16,0"
  561. HorizontalAlignment="Left"
  562. Command="{Binding CancelCommand}"
  563. Style="{StaticResource btn.sec}" />
  564. </StackPanel>
  565. </cus:DialogContent.BottmBar>
  566. </cus:DialogContent>
  567. </UserControl>