问题描述
我试图在android屏幕的底部找到Tabbing栏,我已经在后面的C#代码中找到了,但是我只是想知道如何在.xaml代码中做到这一点?
I'm trying to locate the Tabbing bar in the bottom of the screen in android and I already did in the C# code behind but I'm just wondering how to do that in the .xaml code?
我添加了Xamarin.Forms.PlatformConfiguration.AndroidSpecific
命名空间,但是找不到如下图所示的ToolbarPlacement
属性以将其设置为"Bottom"
.
I've added the Xamarin.Forms.PlatformConfiguration.AndroidSpecific
namespace but can't find the ToolbarPlacement
attribute to set it to "Bottom"
like is shown in the image below.
那么有没有办法在xaml代码中进行设置?
So is there a way to set it in the xaml code?
推荐答案
据我了解,您的Xamarin.Forms
软件包不是最新的,因此您无法使用该功能.只需将Xamarin.Forms
软件包更新为3+,我认为那应该可以解决您的问题.
From what I see your Xamarin.Forms
package is not up to date because of which you are unable to use that feature. Just update the Xamarin.Forms
package to 3+ and I think that should solve your issue.
如有查询,请随时还原
更新:
尝试手动添加以下几行,然后尝试是否可行:
Try adding the following lines manually and try if it works:
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
android:TabbedPage.ToolbarPlacement="Bottom"
这篇关于在哪里可以找到TabbedPage的ToolbarPlacement属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!