VerifyPassWordDialog.xaml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <UserControl
  2. x:Class="PDF_Office.Views.Dialog.VerifyPassWordDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:dialog="clr-namespace:PDF_Office.ViewModels.Dialog"
  7. xmlns:local="clr-namespace:PDF_Office.Views.Dialog"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:prism="http://prismlibrary.com/"
  10. Width="600"
  11. Height="400"
  12. d:DataContext="{d:DesignInstance Type=dialog:VerifyPassWordDialogViewModel}"
  13. prism:ViewModelLocator.AutoWireViewModel="True"
  14. mc:Ignorable="d">
  15. <prism:Dialog.WindowStyle>
  16. <Style TargetType="{x:Type Window}">
  17. <Setter Property="Title" Value="{Binding Title}" />
  18. <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
  19. <Setter Property="ShowInTaskbar" Value="False" />
  20. <Setter Property="SizeToContent" Value="WidthAndHeight" />
  21. </Style>
  22. </prism:Dialog.WindowStyle>
  23. <StackPanel VerticalAlignment="Center">
  24. <TextBlock
  25. Margin="0,15"
  26. FontSize="14"
  27. Text="Please enter the password to unpass the file" />
  28. <TextBox
  29. Height="32"
  30. Margin="20,0"
  31. VerticalContentAlignment="Center"
  32. FontSize="14"
  33. Text="{Binding Input, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
  34. <TextBox.Style>
  35. <Style TargetType="{x:Type TextBox}">
  36. <Style.Triggers>
  37. <DataTrigger Binding="{Binding ShowWarning}" Value="Visible">
  38. <Setter Property="BorderBrush" Value="Red" />
  39. </DataTrigger>
  40. </Style.Triggers>
  41. </Style>
  42. </TextBox.Style>
  43. </TextBox>
  44. <Grid>
  45. <TextBlock
  46. Name="TxtInput"
  47. Margin="20,0"
  48. HorizontalAlignment="Left"
  49. FontSize="14"
  50. Foreground="Red"
  51. Text="{Binding WarningText}"
  52. Visibility="{Binding ShowWarning}" />
  53. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  54. <Button
  55. Name="BtnOK"
  56. Width="120"
  57. Height="32"
  58. Margin="10,10"
  59. Command="{Binding OKCommand}"
  60. Content="OK" />
  61. <Button
  62. Name="BtnCancel"
  63. Width="120"
  64. Height="32"
  65. Margin="10,0"
  66. Command="{Binding CancelCommand}"
  67. Content="Cancel" />
  68. </StackPanel>
  69. </Grid>
  70. </StackPanel>
  71. </UserControl>