谁能帮我解决我的问题?加载此视图时,扩展器确实会扩展,但在内容内部,网格不会左对齐。我已经尝试了我能想到的一切。任何帮助将不胜感激。
<Expander Background="White" FlowDirection="RightToLeft" Header="Test" BorderBrush="Black" BorderThickness="1" Margin="5">
<Expander.Content>
<Label Background="Orange" Margin="5" HorizontalContentAlignment="Left">
<Grid FlowDirection="LeftToRight" Width="816" HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition Height="25"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<CheckBox Name="chkTest" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="15,0,0,0" Content="Test"/>
<TextBox Name="txtBlah" Grid.Row="0" Grid.Column="1" Text="Blah" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="10,0,0,0" />
<CheckBox Name="chkTest2" Grid.Row="0" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="15,0,0,0" Content="Test2"/>
<TextBox Name="txtBlahBlah" Grid.Row="0" Grid.Column="3" Text="BlahBlah" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="10,0,0,0" />
<TextBlock Name="txtBlockTest3" Grid.Row="0" Grid.Column="4" Text="Test3" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="15,0,0,0"/>
<TextBox Name="txtTest4" Grid.Row="0" Grid.Column="5" Text="Test4" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="5,0,0,0" />
<TextBlock Name="txtBlockTest5" Grid.Row="0" Grid.Column="6" Text="Test5" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="15,0,0,0"/>
<ComboBox Name="cbTest6" Grid.Row="0" Grid.Column="7" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="5,0,0,0"/>
</Grid>
</Label>
</Expander.Content>
</Expander>