123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <UserControl
- x:Class="PDF_Office.Views.Dialog.VerifyPassWordDialog"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:dialog="clr-namespace:PDF_Office.ViewModels.Dialog"
- xmlns:local="clr-namespace:PDF_Office.Views.Dialog"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- Width="600"
- Height="250"
- d:DataContext="{d:DesignInstance Type=dialog:VerifyPassWordDialogViewModel}"
- prism:ViewModelLocator.AutoWireViewModel="True"
- mc:Ignorable="d">
- <prism:Dialog.WindowStyle>
- <Style TargetType="{x:Type Window}">
- <Setter Property="Title" Value="{Binding Title}" />
- <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
- <Setter Property="ShowInTaskbar" Value="False" />
- <Setter Property="SizeToContent" Value="WidthAndHeight" />
- <Setter Property="Icon">
- <Setter.Value>
- <!-- 去除系统图片 -->
- <DrawingImage />
- </Setter.Value>
- </Setter>
- </Style>
- </prism:Dialog.WindowStyle>
- <StackPanel VerticalAlignment="Center">
- <TextBlock
- Margin="20,15"
- FontSize="18"
- FontWeight="Bold"
- Text="Please enter the password to unpass the file" />
- <TextBox
- Height="32"
- Margin="20,0"
- VerticalContentAlignment="Center"
- FontSize="14"
- Text="{Binding Input, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
- <TextBox.Style>
- <Style TargetType="{x:Type TextBox}">
- <Style.Triggers>
- <DataTrigger Binding="{Binding ShowWarning}" Value="Visible">
- <Setter Property="BorderBrush" Value="Red" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBox.Style>
- </TextBox>
- <Grid>
- <TextBlock
- Name="TxtInput"
- Margin="20,10"
- HorizontalAlignment="Left"
- FontSize="14"
- Foreground="Red"
- Text="{Binding WarningText}"
- Visibility="{Binding ShowWarning}" />
- <StackPanel
- Margin="20,0"
- HorizontalAlignment="Right"
- Orientation="Horizontal">
- <Button
- Name="BtnOK"
- Width="120"
- Height="32"
- Margin="10,10"
- Command="{Binding OKCommand}"
- Content="OK" />
- <Button
- Name="BtnCancel"
- Width="120"
- Height="32"
- Margin="10,0,0,0"
- Command="{Binding CancelCommand}"
- Content="Cancel" />
- </StackPanel>
- </Grid>
- </StackPanel>
- </UserControl>
|