[英]How do I hide the default toolbar button (three dots) in Xamarin.Forms UWP
I have a Xamarin.Forms UWP app with a <ContentPage.ToolbarItems>
defined with two toolbarItems. 我有一个Xamarin.Forms UWP应用程序,其中
<ContentPage.ToolbarItems>
使用两个toolbarItems定义。 In UWP this toolbar renders but displays an extra (or default) button with 3 dots that expands but does not contain any buttons. 在UWP中,此工具栏呈现但显示一个额外的(或默认)按钮,其中3个点可以展开,但不包含任何按钮。 I want to remove this extra button.
我想删除这个额外的按钮。
I found some references on this problem but they didn't work for me: 我找到了一些关于这个问题的参考资料,但它们对我不起作用:
As per the answer in the link that you mentioned in your post, did you tried to put below code in your App.Xaml of your UWP project: 根据您在帖子中提到的链接中的答案,您是否尝试将下面的代码放在您的UWP项目的App.Xaml中:
<Application.Resources>
<x:Double x:Key="AppBarExpandButtonThemeWidth">0</x:Double>
</Application.Resources>
Since Windows 10 Anniversary Edition ( so your project's min version is 14393 and target version is 14393 or greater ) there is a property on the CommandBar that you can use to toggle the visibility of the 3 dots/more button. 自Windows 10周年纪念版(因此您的项目的最小版本为14393,目标版本为14393或更高版本)后,CommandBar上有一个属性可用于切换3点/更多按钮的可见性。
It's call OverflowButtonVisibilty and the docs are here: https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.commandbar.overflowbuttonvisibility 它的调用是OverflowButtonVisibilty,文档在这里: https : //docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.commandbar.overflowbuttonvisibility
You can set it like so 你可以像这样设置它
<CommandBar OverflowButtonVisibility="Collapsed"></CommandBar>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.