我在尝试让我的 GridView 项目模板垂直位于我的 Gridview 标题下时遇到问题。目前,它漂浮在标题的右侧,我无法让它“清除”并坐在下面。这是我的代码:
<GridView Grid.Column="3" ItemsSource="{Binding TestData, Mode=OneWay}" SelectionMode="Multiple" IsSwipeEnabled="true" IsItemClickEnabled="true" Grid.Row="1" Width="417">
<GridView.Header>
<TextBlock Text="Measures" Margin="10,0,0,18" Style="{StaticResource SectionTitle}"/>
</GridView.Header>
<GridView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<TextBox Text="Here is some form text!!" Grid.Column="0" HorizontalAlignment="Stretch" Padding="0,0,10,0" BorderThickness="0" Background="Transparent" Foreground="White"/>
<ComboBox Grid.Column="1" HorizontalAlignment="right">
<ComboBoxItem>N/A</ComboBoxItem>
<ComboBoxItem>Existing</ComboBoxItem>
<ComboBoxItem>Proposed</ComboBoxItem>
</ComboBox>
<TextBox Grid.Column="1" Grid.Row="1" HorizontalAlignment="right" Text="Date" VerticalAlignment="Top"/>
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
谢谢你的帮助!