【发布时间】:2020-04-02 14:47:17
【问题描述】:
我正在尝试构建一个导航栏,上面有 5 个图标(每个图标都有自己的页面)。我目前遇到的问题是,每当我单击其中一个图标时,它会在您选择该页面时将其向上移动一点(类似于弹出窗口)。我知道它可能是某种必须设置为 false 的属性,但我不知道具体是哪个。 任何帮助将不胜感激,谢谢。
MainPage.xaml 的 XAML 代码:
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="clr-namespace:StudioDen.View"
mc:Ignorable="d"
x:Class="StudioDen.MainPage"
BarBackgroundColor="#FFDA00"
UnselectedTabColor="Black"
SelectedTabColor="Black">
<!--The last three properties set the colours of the bar to yellow and the icons to black-->
<!--Projects view on the tabbed page-->
<NavigationPage IconImageSource="ic_projects.png" >
<x:Arguments>
<views:Projects />
</x:Arguments>
</NavigationPage>
<!--Events view on the tabbed page-->
<NavigationPage IconImageSource="ic_events.png" >
<x:Arguments>
<views:Events/>
</x:Arguments>
</NavigationPage>
<!--Upload view on the tabbed page-->
<NavigationPage IconImageSource="ic_uploadV2.png" >
<x:Arguments>
<views:Upload/>
</x:Arguments>
</NavigationPage>
<!--Process view on the tabbed page-->
<NavigationPage IconImageSource="ic_processV3.png" >
<x:Arguments>
<views:Process />
</x:Arguments>
</NavigationPage>
<!--Login view on the tabbed page-->
<NavigationPage IconImageSource="ic_loginV2.png" >
<x:Arguments>
<views:Login />
</x:Arguments>
</NavigationPage>
</TabbedPage>
【问题讨论】:
标签: c# android xaml xamarin.forms tabbedpage