简体   繁体   English

Xamarin.Forms工具栏菜单动画问题

[英]Xamarin.Forms Toolbar Menu Animation issue

I´m developing a Xamarin Forms application. 我正在开发Xamarin Forms应用程序。 I added two Toolbar items to a content page by setting the Order property to 'Secondary' so it appears on a menu just on the right. 我通过将Order属性设置为“ Secondary”将两个工具栏项添加到内容页面,以便它显示在右侧的菜单上。 If I select any toolbar item it is moving to the top-left part of the screen before it dissapears.I've implemented this toolbar menu before also but never face this kind of issue and don't know why is it behaving like this.Is there any way to remove this animation,can anyone please help me with this. 如果我选择了任何工具栏项,它就会消失在屏幕的左上角。我之前也已经实现了这个工具栏菜单,但从未遇到过此类问题,也不知道为什么会这样。有什么办法可以删除这个动画,谁能帮我这个忙。

Here is my code for toolbar items 这是我的工具栏项目代码

<ContentPage.ToolbarItems>
    <ToolbarItem Text="Action1" Order="Secondary" Priority="0" Command="{Binding Action1Command}"/>
    <ToolbarItem Text="Action2" Order="Secondary" Priority="1" Command="{Binding Action2Command}"/>
    <ToolbarItem Text="Action3" Order="Secondary" Priority="2" Command="{Binding Action3Command}"/>
    <ToolbarItem Text="Action4" Order="Secondary" Priority="3" Command="{Binding Action3Command}"/>
</ContentPage.ToolbarItems>

Thank you. 谢谢。

Did you tried adding toolbar items on XAML? 您是否尝试过在XAML上添加工具栏项? for example 例如

 <ContentPage.ToolbarItems>
        <ToolbarItem Name="Search" Clicked="search_clicked" Icon="search.png" Priority="0"  />
    </ContentPage.ToolbarItems>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM