简体   繁体   中英

Xamarin.Forms Toolbar Menu Animation issue

I´m developing a Xamarin Forms application. 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. 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? for example

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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