C#(.Net)
WPF) 1. 로그인창 만들기. (초보자를 위한 c# 200제, p419)
junl
2021. 7. 8. 00:04
특이점. <PasswordBox x:Name="password_box" VerticalAlignment="Top" Margin="199,81,70,0" Height="33" Grid.Row="2" RenderTransformOrigin="0.5,0.5" PasswordChar="*">
PasswordBox 도구상자로 텍스트를 "*"로 변환

<Window x:Class="WpfApp4.MainWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp4"
mc:Ignorable="d"
Title="MainWindow" Height="308.642" Width="408.058">
<Grid RenderTransformOrigin="0.5,0.5" Margin="0,-1,10.333,8.333" Background="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}">
<Grid.RowDefinitions>
<RowDefinition Height="8*"/>
<RowDefinition Height="11*"/>
<RowDefinition Height="117*"/>
</Grid.RowDefinitions>
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="0.345"/>
<TranslateTransform/>
</TransformGroup>
</Grid.RenderTransform>
<Label Content="아이디" HorizontalAlignment="Left" VerticalAlignment="Top" Height="43" Width="81" Margin="56,30,0,0" FontSize="20" Grid.Row="2"/>
<Label Content="패스워드" HorizontalAlignment="Left" VerticalAlignment="Top" Height="43" Width="97" Margin="56,78,0,0" FontSize="20" Grid.Row="2"/>
<TextBox x:Name="Id_box" HorizontalAlignment="Left" Height="36" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Margin="202,30,0,0" Grid.Row="2"/>
<Button x:Name="login_bt" Content="로그인" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="247,131,0,0" Height="40" FontSize="14" Click="login_bt_Click" Grid.Row="2"/>
<TextBox x:Name="result_box" HorizontalAlignment="Left" Height="35" TextWrapping="Wrap" VerticalAlignment="Top" Width="178" Margin="165,189,0,0" Background="#FFB7B4B4" OpacityMask="Black" SelectionBrush="#FF28292A" BorderBrush="#FF0F0F10" Grid.Row="2" >
<TextBox.CaretBrush>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</TextBox.CaretBrush>
</TextBox>
<PasswordBox x:Name="password_box" VerticalAlignment="Top" Margin="199,81,70,0" Height="33" Grid.Row="2" RenderTransformOrigin="0.5,0.5" PasswordChar="*">
<PasswordBox.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="-1"/>
<SkewTransform/>
<RotateTransform Angle="-179.963"/>
<TranslateTransform/>
</TransformGroup>
</PasswordBox.RenderTransform>
</PasswordBox>
</Grid>
</Window>