當我選擇更迭和發展的線索屏幕下面的一個,但在菜單中沒有這樣的空間,但是從菜單測試頁,在這兩者之間是母版如何刪除白色的空間?
[ [ 1
我想在白刪除這個空間,但我沒有不contentpage添加填充物,我不知道該怎麼做,但我添加了一個NavigationPage.HasNavigationBar=true
,但我不能導航欄的前頂部控制。 此外,如果我添加填充到內容頁面,它只會在NavigationBar後修改。
我注意到,如果更改模擬器的api 19這個空間在白色不存在。 The screenshots are, on the left: 5.2 Marshmallow(6.0.0)XXHDPI Phone (Android 6.0 -Api 23) and right is: 5 Kitkat (4.4) XXHDPI Phone (Andoid 4.4 - API 19)
這是我的代碼的xml:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="DefinityFirst.Mobile.Pages.SuccessAndDev.Dashboard"
xmlns:ctrl="clr-namespace:DefinityFirst.Mobile.Pages.SuccessAndDev.Accordion;assembly=DefinityFirst.Mobile"
Title="Trails"
NavigationPage.HasNavigationBar="true"
xmlns:control="clr-namespace:DefinityFirst.Mobile.Pages.SuccessAndDev;assembly=DefinityFirst.Mobile"
>
<!--<ContentPage.Padding>
<OnPlatform x:Key="GeneralPadding2"
x:TypeArguments="Thickness"
iOS="10"
Android="0,10,0,0"
WinPhone="15"/>
</ContentPage.Padding>-->
<!--<ContentPage.Padding>
<OnPlatform x:TypeArguments="Thickness" iOS="20, 40, 20, 20" Android="20, 20, 20, 20" WinPhone="20, 20, 20, 20" />
</ContentPage.Padding>-->
<ContentPage.Content>
<ContentView>
<!--CONTENEDOR TRAIL; LEVEL; PROGRESBAR-->
<StackLayout BackgroundColor="#F5F5F5">
<Frame Padding="3,1,1,2.5" HasShadow="True" Margin="10">
<StackLayout BackgroundColor="#E1E1E1">
<StackLayout Orientation="Vertical" BackgroundColor="#1F549D" Padding="5,0,0,0">
<StackLayout Orientation="Vertical" Padding="5,5,5,5" x:Name="stTrails" BackgroundColor="White">
<Label Text="{Binding Name}" TextColor="#FF020202" FontSize="18" FontAttributes="Bold"/>
<StackLayout Orientation="Horizontal" x:Name="nameLevel">
<Label Text="{Binding Name}" TextColor="#FF020202" FontSize="16" HorizontalOptions="StartAndExpand"/>
<Image Source="mayorq.png" HorizontalOptions="EndAndExpand"/>
</StackLayout>
<StackLayout Orientation="Vertical">
<ProgressBar Progress="{Binding ProgressLevel}" WidthRequest="500" HeightRequest="15" HorizontalOptions="StartAndExpand" x:Name="progresBar"/>
<!--<control:CustomProgressBar x:Name="progressBar2" Progress=".02" />-->
</StackLayout>
</StackLayout>
</StackLayout>
</StackLayout>
</Frame>
<StackLayout Orientation="Horizontal" Padding="4,1,1,2.5">
<Label Text="Item List" FontSize="15.8" HorizontalOptions="StartAndExpand" Margin="10"/>
<Picker x:Name="pickerStatusFilter" Title="Filter by status" HorizontalOptions="EndAndExpand" TextColor="#FF020202"/>
</StackLayout>
<!--<BoxView/>
<StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand" Spacing="50">
<Button Text="a" HorizontalOptions="FillAndExpand" TextColor="{StaticResource MainColor}" BackgroundColor="Aqua"/>
<Button Style="{StaticResource MainButton}" Text="b"/>
<Button Text="c" HorizontalOptions="FillAndExpand"/>
</StackLayout>-->
<!--<StackLayout Orientation="Horizontal">
</StackLayout>-->
<!--ACCORDION-->
<StackLayout Padding="0,0,0,0" BackgroundColor="White">
<ScrollView>
<ctrl:Accordion x:Name="SecOne" FirstExpaned = "true"/>
</ScrollView>
</StackLayout>
</StackLayout>
</ContentView>
</ContentPage.Content>
</ContentPage>
母版頁:
<?xml version="1.0" encoding="utf-8" ?>
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="DefinityFirst.Mobile.Pages.SuccessAndDev.MasterPage"
xmlns:pages="clr-namespace:DefinityFirst.Mobile.Pages.SuccessAndDev;assembly=DefinityFirst.Mobile"
NavigationPage.HasNavigationBar="false">
<MasterDetailPage.Master>
<pages:MenuPage x:Name="menuPage" />
</MasterDetailPage.Master>
<MasterDetailPage.Detail>
<NavigationPage x:Name="Navigator" BarBackgroundColor="{StaticResource MainColor}">
<x:Arguments>
<pages:Dashboard/>
</x:Arguments>
</NavigationPage>
</MasterDetailPage.Detail>
</MasterDetailPage>
使用Xamarin Inspector首先檢查它屬於哪個組件。 –
@LexLi督察支持因未知原因而被禁用 –
督察要求VS/XS企業 – therealjohn