|
- <Window
- x:Class="BPASmartClient.CustomResource.Pages.View.PasswordChangeView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:common="clr-namespace:BPASmartClient.CustomResource.Pages.Model"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.CustomResource.Pages.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.CustomResource.Pages.ViewModel"
- Title="PasswordChangeView"
- Width="500"
- Height="350"
- AllowsTransparency="True"
- Background="{x:Null}"
- Topmost="True"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d">
-
- <Window.DataContext>
- <vm:PasswordChangeViewModel />
- </Window.DataContext>
-
- <Window.Resources>
- <Style x:Key="TxLogin" TargetType="TextBlock">
- <Setter Property="FontSize" Value="20" />
- <Setter Property="Foreground" Value="#ddd" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- </Style>
-
- <!--#region 密码输入框样式-->
- <Style x:Key="PasswordBoxStyle" TargetType="{x:Type PasswordBox}">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="FontFamily" Value="Times New Roman" />
- <Setter Property="PasswordChar" Value="●" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
- <Setter Property="HorizontalContentAlignment" Value="Left" />
- <Setter Property="Padding" Value="1" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="AllowDrop" Value="true" />
- <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
- <Setter Property="CaretBrush" Value="#009DFF" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type PasswordBox}">
- <Border
- x:Name="Bd"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="5"
- SnapsToDevicePixels="true">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="40" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- x:Name="UserTextBlock"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="../../Fonts/#iconfont"
- FontSize="20"
- Foreground="{TemplateBinding BorderBrush}"
- Text="" />
-
- <!--<TextBlock
- Name="markText"
- Grid.Column="1"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#88009dff"
- Text="请输入账号密码"
- Visibility="Collapsed" />-->
-
- <ScrollViewer
- x:Name="PART_ContentHost"
- Grid.Column="1"
- MinHeight="20"
- VerticalAlignment="Center"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
-
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Bd" Property="Opacity" Value="0.56" />
- <Setter TargetName="UserTextBlock" Property="Opacity" Value="0.56" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="Bd" Property="BorderBrush" Value="#FF7EB4EA" />
- <Setter TargetName="UserTextBlock" Property="Foreground" Value="#FF7EB4EA" />
- </Trigger>
- <Trigger Property="IsKeyboardFocused" Value="true">
- <Setter TargetName="Bd" Property="BorderBrush" Value="#FF569DE5" />
- <Setter TargetName="UserTextBlock" Property="Foreground" Value="#FF569DE5" />
- </Trigger>
- <!--<DataTrigger Binding="{Binding Path=Password, RelativeSource={RelativeSource Mode=self}}" Value="">
- <Setter TargetName="markText" Property="Visibility" Value="Visible" />
- </DataTrigger>-->
-
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
- <Condition Property="IsSelectionActive" Value="false" />
- </MultiTrigger.Conditions>
- <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
- </MultiTrigger>
- </Style.Triggers>
- </Style>
- <!--#endregion-->
-
- <!--#region 用户输入框样式-->
- <Style x:Key="UserTextBoxStyle" TargetType="TextBox">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="CaretBrush" Value="#009DFF" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="TextBox">
- <Border
- x:Name="border"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="5"
- SnapsToDevicePixels="true">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="40" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- x:Name="PasswordTextBlock"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="../../Fonts/#iconfont"
- FontSize="20"
- Foreground="{TemplateBinding BorderBrush}"
- Text="" />
-
- <TextBlock
- Name="markText"
- Grid.Column="1"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#88009dff"
- Text="请输入账号名称"
- Visibility="Collapsed" />
-
-
- <ScrollViewer
- x:Name="PART_ContentHost"
- Grid.Column="1"
- MinHeight="20"
- VerticalAlignment="Center"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
-
- </Border>
-
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="border" Property="Opacity" Value="0.56" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="border" Property="BorderBrush" Value="#FF7EB4EA" />
- </Trigger>
- <Trigger Property="IsKeyboardFocused" Value="true">
- <Setter TargetName="border" Property="BorderBrush" Value="#FF569DE5" />
- </Trigger>
- <DataTrigger Binding="{Binding Path=Text, RelativeSource={RelativeSource Mode=self}}" Value="">
- <Setter TargetName="markText" Property="Visibility" Value="Visible" />
- </DataTrigger>
- </ControlTemplate.Triggers>
-
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- </Window.Resources>
-
- <Border
- x:Name="br"
- BorderBrush="#009dff"
- BorderThickness="2">
- <Border.Effect>
- <DropShadowEffect
- BlurRadius="10"
- ShadowDepth="1"
- Color="#009DFF" />
- </Border.Effect>
- <Grid>
- <Image Source="../../Image/登录界面背景.jpg" Stretch="Fill" />
- <Image Source="../../Image/阴影边框.png" Stretch="Fill" />
-
- <Grid Margin="50,20">
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <TextBlock
- Margin="0,10,0,0"
- HorizontalAlignment="Center"
- FontSize="20"
- Foreground="#ddd"
- Text="密码修改" />
-
- <TextBlock
- Margin="20,10,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Bottom"
- FontSize="16"
- Foreground="#FFEF2020"
- Text="{Binding ErrorInfo}" />
-
- <Grid Grid.Row="1">
- <PasswordBox
- Name="oldpb"
- Height="40"
- Margin="20,0"
- common:PasswordHelper.Attach="True"
- common:PasswordHelper.Password="{Binding OldPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
- BorderBrush="#009DFF"
- FontSize="16"
- Foreground="#aadddddd"
- PasswordChanged="oldpb_PasswordChanged"
- Style="{DynamicResource PasswordBoxStyle}"
- TabIndex="2" />
-
- <TextBlock
- Name="oldmarkText"
- Margin="70,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#88009dff"
- IsHitTestVisible="False"
- Text="请输入原密码"
- Visibility="Visible" />
-
- </Grid>
-
- <Grid Grid.Row="2">
- <PasswordBox
- Name="newpb1"
- Height="40"
- Margin="20,0"
- common:PasswordHelper.Attach="True"
- common:PasswordHelper.Password="{Binding NewPassword1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
- BorderBrush="#009DFF"
- FontSize="16"
- Foreground="#aadddddd"
- PasswordChanged="newpb1_PasswordChanged"
- Style="{DynamicResource PasswordBoxStyle}"
- TabIndex="2" />
-
- <TextBlock
- Name="newmarkText1"
- Margin="70,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#88009dff"
- IsHitTestVisible="False"
- Text="请输入新密码"
- Visibility="Visible" />
-
- </Grid>
-
- <Grid Grid.Row="3">
- <PasswordBox
- Name="newpb2"
- Height="40"
- Margin="20,0"
- common:PasswordHelper.Attach="True"
- common:PasswordHelper.Password="{Binding NewPassword2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
- BorderBrush="#009DFF"
- FontSize="16"
- Foreground="#aadddddd"
- PasswordChanged="newpb2_PasswordChanged"
- Style="{DynamicResource PasswordBoxStyle}"
- TabIndex="2" />
-
- <TextBlock
- Name="newmarkText2"
- Margin="70,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#88009dff"
- IsHitTestVisible="False"
- Text="请再次输入新密码"
- Visibility="Visible" />
-
- </Grid>
-
- <Grid Grid.Row="4">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <Button
- Margin="20,10"
- Background="#009DFF"
- BorderThickness="0"
- Command="{Binding ExitCommand}"
- Content="取 消"
- FontSize="20"
- Foreground="White" />
-
- <Button
- Grid.Column="1"
- Margin="20,10"
- Background="#009DFF"
- BorderThickness="0"
- Command="{Binding LoginCommand}"
- Content="确 认"
- FontSize="20"
- Foreground="White"
- TabIndex="3" />
-
- </Grid>
-
- </Grid>
- </Grid>
-
- </Border>
-
- </Window>
|