여기에 내가 원하는 레이아웃입니다. 행 2, 열 1에 그룹 상자가 포함됩니다. 행 2, 열 2에 다른 그룹 상자가 포함됩니다.두 열에 걸쳐 WPF 그룹 상자를 구현하는 방법은 무엇입니까? 모두 열 걸쳐 그룹 상자를 포함해야 2 열, 2 행</p> <p>행 1</p> <p>그리드 :
행 1의 그룹 상자에서 왼쪽에 레이블/콤보 상자 스택이 있어야합니다. 오른쪽에는 레이블/체크 상자 스택이 있습니다. 행 2/열 1 그룹 상자에서 첫 번째 행의 레이블/콤보 상자와 정렬해야하는 더 많은 레이블/콤보 상자를 원합니다. 행 2/열 2 그룹 상자에서 첫 번째 행의 레이블/확인란과 정렬되는 더 많은 레이블/확인란을 원합니다.
여기까지 제가 지금까지 있습니다. 내가 겪고있는 문제는 1 행의 그룹 상자에있는 레이블/콤보 상자 쌍이 전체 그룹 상자를 확장하려고한다는 것입니다. 그러나 레이블/콤보 상자가 들어있는 내부 격자에 대해 행 = 0, 열 = 0을 명시 적으로 설정하고 있습니다.
Studio가없는 컴퓨터에서 인쇄물을 입력 할 때 컴파일되지 않으면 용서해주십시오.
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<Grid.ColumnDefinitions>
<GroupBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
<GroupBox.Header>
<Label Content="Device Configuration"></Label>
</GroupBox.Header>
<Grid Grid.Row="0" Column="0">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="0" Content="Label 1"></Label>
<ComboBox Grid.Column="1" Grid.Row="0"></ComboBox>
<Label Grid.Column="0" Grid.Row="1" Content="Label 2"></Label>
<ComboBox Grid.Column="1" Grid.Row="1"></ComboBox>
<Label Grid.Column="0" Grid.Row="2" Content="Label 3"></Label>
<ComboBox Grid.Column="1" Grid.Row="2"></ComboBox>
</Grid>
</GroupBox>
</Grid>