<UserControl x:Class="NebulaAuth.View.Dialogs.SetCryptPasswordDialog"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:other="clr-namespace:NebulaAuth.ViewModel.Other"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             mc:Ignorable="d"
             d:DataContext="{d:DesignInstance other:LoginAgainVM}">


    <Grid MinHeight="100" MinWidth="300" MaxWidth="400">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid Margin="10,10,10,5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <StackPanel Orientation="Horizontal">
                <materialDesign:PackIcon Kind="Encryption" Width="20" Height="20" Margin="0,0,5,0"
                                         VerticalAlignment="Center"
                                         Foreground="{DynamicResource PrimaryContentBrush}" />
                <TextBlock FontStyle="Normal" Foreground="{DynamicResource BaseContentBrush}"
                           HorizontalAlignment="Left"
                           VerticalAlignment="Center" FontSize="18" Text="{Tr SetEncryptionPasswordDialog.Title}" />
            </StackPanel>
            <Button Grid.Column="1" Width="30" Height="30" Style="{StaticResource MaterialDesignIconForegroundButton}"
                    HorizontalAlignment="Right" CommandParameter="{StaticResource False}"
                    Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}">
                <materialDesign:PackIcon Kind="Close" Width="24" Height="24" Foreground="IndianRed" />

            </Button>
        </Grid>
        <Separator Grid.Row="1" Opacity="0.7" />
        <TextBlock Grid.Row="2" IsHitTestVisible="False" TextWrapping="Wrap" FontWeight="Normal"
                   FontSize="16"
                   Text="{Tr SetEncryptionPasswordDialog.DialogText}"
                   Margin="10" HorizontalAlignment="Left" />
        <PasswordBox TabIndex="0" FontSize="16" x:Name="PasswordBox"
                     materialDesign:PasswordBoxAssist.Password="{Binding Password, UpdateSourceTrigger=PropertyChanged}"
                     Margin="10" Grid.Row="3" Style="{StaticResource MaterialDesignFloatingHintRevealPasswordBox}"
                     materialDesign:HintAssist.Hint="{Tr SetEncryptionPasswordDialog.Password}" />
        <Grid Grid.Row="4" Margin="10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Button IsDefault="True" Margin="10,5,5,5" Style="{StaticResource MaterialDesignOutlinedButton}"
                    Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
                    CommandParameter="{StaticResource True}" Content="{Tr SetEncryptionPasswordDialog.Ok}" />
            <Button IsCancel="True" Grid.Column="1" Margin="5,5,10,5"
                    Style="{StaticResource MaterialDesignOutlinedButton}"
                    Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
                    CommandParameter="{StaticResource False}" Content="{Tr SetEncryptionPasswordDialog.Cancel}" />
        </Grid>
    </Grid>
</UserControl>