Xaml xamarin形式的不必要条带

Xaml xamarin形式的不必要条带,xaml,xamarin,xamarin.forms,Xaml,Xamarin,Xamarin.forms,在mobile上编译时,会出现代码中没有的空行。在设计师的工作室里一切都很好,但在电话里一切都不一样。错误可能在哪里 <Grid.RowDefinitions> <RowDefinition Height="2*"/> <RowDefinition Height="3*"/> <RowDefinition Height="auto"/>

在mobile上编译时,会出现代码中没有的空行。在设计师的工作室里一切都很好,但在电话里一切都不一样。错误可能在哪里

    <Grid.RowDefinitions>
        <RowDefinition Height="2*"/>
        <RowDefinition Height="3*"/>
        <RowDefinition Height="auto"/>
        <RowDefinition Height="10*"/>
        <RowDefinition Height="auto"/>
        <RowDefinition Height="4*"/>
    </Grid.RowDefinitions>

    <Grid Row="0" ColumnSpacing="0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="5*"/>
            <ColumnDefinition Width="auto"/>
        </Grid.ColumnDefinitions>
        <Grid Column="0">
            <SearchBar  x:Name="SearchNickname" 
                        BackgroundColor="{Binding BackColor}"
                        CancelButtonColor="{Binding TextColor}" 
                        PlaceholderColor="{Binding TextColor}"
                        TextColor="{Binding TextColor}"
                        HorizontalTextAlignment="Center"
                        VerticalTextAlignment="Center"
                        Placeholder="Введите свой ник"           
                        SearchCommand="{Binding SearchCmd}" 
                        Text="{Binding SearchText, Mode=TwoWay, UpdateSourceEventName=TextChanged}" 
                        MaxLength="100"/>
        </Grid>
        <Grid Column="1" BackgroundColor="{Binding BackColor}">
            <Button ImageSource="https://assets.laut.fm/f69a3423e545055c32430e0a77ebe148?t=_120x120" 
                    BackgroundColor="{Binding BackColor}"
                    Command="{Binding SettingsCmd}"/>
        </Grid>
    </Grid>

这条带子是从哪里来的


designer studio中沿顶部的图像是标题/导航栏,默认情况下在Xamarin表单页面中可以看到。您可以修改或抑制它。

您测试的设备类型是什么?xaml的根父级是什么?内容页?壳可能是appbar/导航栏。请将导航栏设置为false