How to change open animation of flyout menu

Muhammad Saifullah

I have a menu flyout which is opened on ListView Items. The default open animation is quite slow is there a way to change the default animation of flyout menu?

EDIT

I am using following dependency property for showing context menu on list view item it works fine but when context menu is shown it squeezes the the whole view a bit. I do not want to squeeze the page when context menu is opened.

 public class OpenMenuFlyoutAction:DependencyObject,IAction
{

    public object Execute(object sender, object parameter)
    {
        if (!Global.IsDisabledShowContextMenuOnListView)
        {
            FrameworkElement senderElement = sender as FrameworkElement;
            FlyoutBase flyoutBase = FlyoutBase.GetAttachedFlyout(senderElement);

            flyoutBase.ShowAt(senderElement);
        }
        return null;
    }

}

List Item data template

 <DataTemplate x:Key="MemberListItemDataTemplate">
    <Grid Width="{Binding ElementName=searchView,Path=ActualWidth}" Background="{Binding ItemBackground}"
          Margin="0,0,0,20" Height="auto">
        <i:Interaction.Behaviors>
            <icore:EventTriggerBehavior EventName="Holding">
                <helpers:OpenMenuFlyoutAction />
            </icore:EventTriggerBehavior>
        </i:Interaction.Behaviors>
        <FlyoutBase.AttachedFlyout>
            <MenuFlyout>

                <MenuFlyoutItem Text="share" RequestedTheme="Dark" Command="{Binding ElementName=pageMyProfile, Path=DataContext.ShareMemberDetails}" CommandParameter="{Binding item99}" />
                <MenuFlyoutItem Text="reomve from members" RequestedTheme="Dark" Command="{Binding ElementName=pageMyProfile, Path=DataContext.RemoveMember}" CommandParameter="{Binding item99}" />
            </MenuFlyout>
        </FlyoutBase.AttachedFlyout>
  ...
  </DataTemplate>
Igor Ralic

Yeah, you need to create a new Style targeting MenuFlyoutPresenter in your resources

<Style TargetType="MenuFlyoutPresenter"> 

If you copy it from Program Files (x86)\Windows Phone Kits\8.1\Include\abi\Xaml\Design\generic.xaml you'll notice there are already some storyboards inside for various visual states that you need to change in order to get a different animation.

I wrote about something very similar in my blog post MenuFlyout flip animation on Windows Phone WinRT

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to Change The ViewPagerIndicator's Animation

From Dev

How to create a smooth animation for my menu?

From Dev

Flyout navigation controller menu indicator

From Dev

MvvmCross - Flyout Navigation, Hamburger Menu, Sliding Menu for Android and iOS

From Dev

C# XAML Flyout change headerbackground color

From Dev

How to choose flyout menu item in c# metro style app

From Dev

Android - How to change the animation of an activity

From Dev

How to change direction of CALayer animation

From Dev

Flyout Menu windows phone 8.1 on hold Listview

From Dev

How to change open animation of flyout menu

From Dev

FlyOut menu design issue when adding fragment

From Dev

Windows 10 UWP app menu flyout inside menu item

From Dev

How to change UISegmentedControl index with animation?

From Dev

jquery menu animation close/open

From Dev

How to open a flyout from right side of screen in Windows 10 UWP?

From Dev

How to remove "Open menu"

From Dev

How to Change The ViewPagerIndicator's Animation

From Dev

Flyout or Menu Dropdown in Portal 8 themes

From Dev

MvvmCross - Flyout Navigation, Hamburger Menu, Sliding Menu for Android and iOS

From Dev

Android - How to change the animation of an activity

From Dev

How to open locally stored html file within flyout?

From Dev

How to change direction of CALayer animation

From Dev

How can I change Windows 10 context menu option for New > Text Document to open Notepad++?

From Dev

how to have fix menu with animation

From Dev

Windows 10 UWP app menu flyout inside menu item

From Dev

How to disable menu popup animation

From Dev

how to create Custom action menu with animation

From Dev

How can I change a caret right to a caret down when clicking on it to open sub-menu?

From Dev

How to change the menu prompting in Ubuntu 18.04 when multiple windows of an application are open?

Related Related

  1. 1

    How to Change The ViewPagerIndicator's Animation

  2. 2

    How to create a smooth animation for my menu?

  3. 3

    Flyout navigation controller menu indicator

  4. 4

    MvvmCross - Flyout Navigation, Hamburger Menu, Sliding Menu for Android and iOS

  5. 5

    C# XAML Flyout change headerbackground color

  6. 6

    How to choose flyout menu item in c# metro style app

  7. 7

    Android - How to change the animation of an activity

  8. 8

    How to change direction of CALayer animation

  9. 9

    Flyout Menu windows phone 8.1 on hold Listview

  10. 10

    How to change open animation of flyout menu

  11. 11

    FlyOut menu design issue when adding fragment

  12. 12

    Windows 10 UWP app menu flyout inside menu item

  13. 13

    How to change UISegmentedControl index with animation?

  14. 14

    jquery menu animation close/open

  15. 15

    How to open a flyout from right side of screen in Windows 10 UWP?

  16. 16

    How to remove "Open menu"

  17. 17

    How to Change The ViewPagerIndicator's Animation

  18. 18

    Flyout or Menu Dropdown in Portal 8 themes

  19. 19

    MvvmCross - Flyout Navigation, Hamburger Menu, Sliding Menu for Android and iOS

  20. 20

    Android - How to change the animation of an activity

  21. 21

    How to open locally stored html file within flyout?

  22. 22

    How to change direction of CALayer animation

  23. 23

    How can I change Windows 10 context menu option for New > Text Document to open Notepad++?

  24. 24

    how to have fix menu with animation

  25. 25

    Windows 10 UWP app menu flyout inside menu item

  26. 26

    How to disable menu popup animation

  27. 27

    how to create Custom action menu with animation

  28. 28

    How can I change a caret right to a caret down when clicking on it to open sub-menu?

  29. 29

    How to change the menu prompting in Ubuntu 18.04 when multiple windows of an application are open?

HotTag

Archive