我试图让 TabbedPage 正常工作,即我希望菜单显示在底部:
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="App.View.TabbedPageNavigation"
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
xmlns:tabView="clr-namespace:Syncfusion.XForms.TabView;assembly=Syncfusion.SfTabView.XForms"
android:TabbedPage.ToolbarPlacement="Bottom"
xmlns:local="clr-namespace:App.View">
<TabbedPage.Children>
<local:HikeList Title="My Hikes">
<local:HikeList.Icon>
<OnPlatform x:TypeArguments="FileImageSource">
<On Platform="iOS, Android" Value="iconmydiaries.png"/>
</OnPlatform>
</local:HikeList.Icon>
</local:HikeList>
<local:HikeList Title="Friends">
<local:HikeList.Icon>
<OnPlatform x:TypeArguments="FileImageSource">
<On Platform="iOS, Android" Value="iconfriendsdiaries.png"/>
</OnPlatform>
</local:HikeList.Icon>
</local:HikeList>
<local:SettingsPage Title="Settings" Icon="iconsettings.png">
<local:SettingsPage.Icon>
<OnPlatform x:TypeArguments="FileImageSource">
<On Platform="iOS, Android" Value="iconsettings.png"/>
</OnPlatform>
</local:SettingsPage.Icon>
</local:SettingsPage>
</TabbedPage.Children>
</TabbedPage>
问题是,图标如下图所示: TabbedMenu 底部
有趣的是,如果我删除带有“ToolbarPlacement”的行,图像就会被渲染得很好(除了它们当然出现在页面顶部)。另请注意,菜单项的大小是不同的,因此看起来好像实际上正在加载图像,但是它们呈现不正确。有谁知道那里发生了什么以及我如何解决这个问题?
提前致谢!