/
n1kolas
/
NoteCreator
Обзор
Документация
Войти
/
n1kolas
/
NoteCreator
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
UI/UserControls/PasswordBox.xaml
55 строк
2 KB
Nicolai
upgradus
13 окт 2025, 23:52
13 окт 2025, 23:52
f1d6a17
Код
Авторство
О чём код?
<UserControl x:Class="LogIn.UI.UserControls.PasswordBox" 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:local="clr-namespace:LogIn.UI.UserControls" mc:Ignorable="d" d:Height="50" d:Width="300"> <StackPanel> <TextBlock TextAlignment="Center" Foreground="{DynamicResource Foreground}" Text="{Binding PasswordBoxHeader}" FontSize="{Binding PasswordBoxHeaderFontSize}" Margin="0,0,0,5" /> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="Auto"></ColumnDefinition> </Grid.ColumnDefinitions> <PasswordBox x:Name="PassBox" Background="{DynamicResource Surface}" BorderBrush="{DynamicResource Secondary}" Foreground="{DynamicResource Foreground}" Margin="0,0,5,0" FontSize="{Binding PasswordBoxFontSize}" Height="{Binding PasswordBoxHeight}" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/> <TextBox Style="{DynamicResource Login}" Visibility="Collapsed" x:Name="PassBoxUnmasked" Background="{DynamicResource Surface}" BorderBrush="{DynamicResource Secondary}" Foreground="{DynamicResource Foreground}" Margin="0,0,5,0" FontSize="{Binding PasswordBoxFontSize}" Width="Auto" Height="{Binding PasswordBoxHeight}" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/> <Button x:Name="ShowPassButton" Grid.Column="1" Width="{Binding PasswordBoxHeight}" Height="{Binding PasswordBoxHeight}" MouseEnter="ShowPassButton_MouseEnter" MouseLeave="ShowPassButton_MouseLeave" Content="👁️"/> </Grid> </StackPanel> </UserControl>