첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

TestProject.zip
0.01MB

▶ MainWindow.xaml

<Window x:Class="TestProject.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Width="800"
    Height="600"
    Title="FocusManager 클래스 : FocusedElement 첨부 속성을 사용해 포커스 설정하기"
    FontFamily="나눔고딕코딩"
    FontSize="16"
    FocusManager.FocusedElement="{Binding ElementName=textBox2}">
    <Grid
        HorizontalAlignment="Center"
        VerticalAlignment="Center">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <TextBlock Grid.Row="0" Grid.Column="0"
            VerticalAlignment="Center"
            Text="항목 1" />
        <TextBox Name="textBox1" Grid.Row="0" Grid.Column="1"
            Margin="10 0 0 0"
            Width="200"
            Height="25"
            BorderThickness="1"
            BorderBrush="Black"
            VerticalContentAlignment="Center" />
        <TextBlock Grid.Row="1" Grid.Column="0"
            VerticalAlignment="Center"
            Margin="0 10 0 0"
            Text="항목 2" />
        <TextBox Name="textBox2" Grid.Row="1" Grid.Column="1"
            Margin="10 10 0 0"
            Width="200"
            Height="25"
            BorderThickness="1"
            BorderBrush="Black"
            VerticalContentAlignment="Center" />
    </Grid>
</Window
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요