지난 3-4 일 동안 WPF를 배우려고합니다. 샘플 xaml로, 나는 격자를 만들고 텍스트 블록과 텍스트 상자의 형태로 일부 컨트롤을 배치하려고했습니다.WPF에서 데이터로 성장하는 텍스트 상자
내가 직면하는 문제는 텍스트 상자에 텍스트를 계속 입력하면 텍스트 상자 너비가 계속 증가하여 차례대로 내 전체 양식이 손상된다는 것입니다.
아무도 문제를 해결할 수 있도록 도와주세요.
이<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" FontSize="25" Margin="5 30 130 0"/>
<TextBox Grid.Row="2" FontSize="25" Grid.Column="1" Grid.ColumnSpan="2" Margin="5 30 130 0"/>
<TextBox Grid.Row="3" FontSize="25" Grid.Column="1" Margin="5 30 160 0"/>
<TextBox Grid.Row="5" FontSize="25" Grid.Column="1" Grid.ColumnSpan="2" Margin="5 30 130 0"/>
</Grid>
사람이 도움이 regard.All의 종류를 알 수있을 것이다 저를 도와주세요 :
다음 텍스트 상자로 구성되어 내 샘플 XAML 코드입니다. 텍스트 크기가 각각 TextBox
의 폭
예를 초과 할 때
나는 이것을 시도했지만 여전히 확장 중이다. –