-
-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There should be an option to disable animations in the whole control #194
Comments
Any suggestions on how to achieve this? |
I could imagine a property in the Ribbon class, maybe called "MenuAnimationStyle", which allows setting any value of an enum {Default,None,BackstageOnly). Then you could bind all PopupAnimation properties in the XAML file like this:
Where ConverterParameter specifies the animation to use if MenuAnimationStyle=Default, so that each theme can still have its own default animation. For the backstage menu we could then adjust the ControlTemplate triggers to only set the margins or use a different animation without duration maybe. I can also try and make these code changes if you agree with my suggestion. |
Let me think about this for a few days. |
Sorry for the delay. I don't have to work from 18.12.2015 till 18.01.2016, so I will implement this then. |
Yes, that would make sense. Animations in RDP can be particularly annoying. |
To solve this issue I was thinking about using MenuPopupAnimation and ComboBoxPopupAnimation from SystemParameters for "regular" controls. The only drawback for "regular" controls would be that the PopupAnimation would be the same for all themes across the ribbon. And I still have to test if it really works. |
If overriding the animation like this http://stackoverflow.com/questions/3160467/how-to-disable-wpf-contextmenu-animations works fine, I think the solution is reasonable. |
As I am the designer I decide that no one needs different default animations. ;-) |
Great, thanks 👍 |
I noticed one issue that is still present in the current version. Not sure if you want to re-open or use this issue. The problem is that ComboBoxPopupAnimationKey=None does not work on sub menus. So if you open a drop down button menu, no animation is used, but if one of the items has a sub menu, it's animated again. |
How about MenuPopupAnimationKey? |
Yep, overriding both of these seems to work fine, thanks. I just wonder why I didn't set both of these options in the first place, seems kind of obvious actually. |
Animations in WPF unfortunately don't work well on many systems and introduce a notiable slowdown when using menu items, dropdown buttons or the backstage menu.
Currently, you have to manually edit all XAML files in Fluent and create a custom version of the control just to disable animations. Much better for maintainability would be a property in the Ribbon or RibbonWindow class to disable animations across the whole control.
The text was updated successfully, but these errors were encountered: