我使用 GridView 但在它的顶部有一个间隙。我怎样才能摆脱它?
图片
黑色边框应该代表GridView
谢谢
包含 GridView 的 xml 部分:`
<Notification:SfHubTile x:Name="informationTile" Grid.Column="0" FontSize="13" Grid.Row="0"/>
<Notification:SfHubTile x:Name="testSettingTile" Content="Testsetting = ?" FontSize="13" Grid.Column="4" Grid.Row="0"/>
<Button x:Name="addTest" Grid.Column="2" HorizontalAlignment="Left" Margin="40,0,0,0" Grid.Row="1" VerticalAlignment="Center" BorderThickness="0" Click="addTest_Click"/>
<GridView ItemsSource="{Binding}" x:Name="testsGridView" Grid.Column="2" Margin="0,0,0,0" >
<GridView.ItemTemplate>
<DataTemplate>
<Notification:SfHubTile Width="300" Height="200" Tapped="tile_Tapped" RightTapped="testRightClicked" Holding="testTileHold">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="500*"/>
</Grid.RowDefinitions>
<TextBox Text="{Binding Path=name, Mode=OneTime}" Margin="10,0,0,0" FontSize="15" TextWrapping="Wrap" Background="Transparent"
BorderThickness="0" Grid.Column="0" Grid.Row="0" LostFocus="name_LostFocus" Name="folder"/>
<TextBlock Margin="0,5,0,5" Text="Anzahl Fragebögen im Test: " FontSize="13" Grid.Row="1" Grid.Column="0"/>
<TextBlock Margin="20,5,0,5" Text="{Binding Path=numberOfQuestionaires, Mode=TwoWay}" FontSize="13" Grid.Row="1" Grid.Column="1"/>
<TextBlock Margin="0,5,0,5" FontSize="13" Text="Anzahl der Propanten: " Grid.Row="2" Grid.Column="0"/>
<TextBlock Margin="20,5,0,5" FontSize="13" Text="{Binding Path=numberOfProbands, Mode=TwoWay}" Grid.Row="2" Grid.Column="1"/>
<TextBlock FontSize="13" Text="Beschreibung: " Grid.Row="3" Grid.Column="0"/>
<ScrollViewer HorizontalScrollMode="Disabled" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Grid.Row="3" Grid.Column="1" Margin="0,5,0,5">
<TextBox Margin="20,0,0,0" FontSize="13" BorderThickness="0" Text="{Binding Path=description, Mode=TwoWay}" Background="Transparent"
TextWrapping="Wrap" Grid.Row="3" Grid.Column="1"/>
</ScrollViewer>
</Grid>
</Notification:SfHubTile>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
</Grid>
</ScrollViewer>
`