Skip to content

TransitionAssist

PigeonMaster edited this page Mar 4, 2021 · 5 revisions

Summary

TransitionAssist provides transitions and animations control. Since Material.Avalonia have a lot transitions and animations for better material design experiences, could affects performances of device. With this assist you can switch transitions and animations to minimize performance usages and power-saving.

Available properties / settings

DisableTransitions

Example

Enable DisableTransitions feature to following:

<Window ...
        xmlns:assists="clr-namespace:Material.Styles.Assists;assembly=Material.Styles"
        assists:TransitionAssist.DisableTransitions="True" >
    <!-- Your elements and widgets -->
</Window>

Example (Code-Behind)

//Use those code on MainWindow will disables all transitions of widgets on MainWindow.
TransitionAssist.SetDisableTransitions(this, true);

Tech notes

After switch up DisableTransitions property, TransitionAssist will attach notransitions class to target and its children elements. If you wish your custom widgets support this feature, just create an style and selector with .notransitions class and do compatibility for your widgets.

Supported widgets

  • Buttons, Floating buttons
  • CheckBox
  • ComboBox (weakly supported since it have a few transitions)
  • Dialogs (by setting DialogHelper.DisableTransitions property, changes will applied in next open up dialogs)
  • ListBoxItem
  • NavigationDrawer
  • ProgressBar (only determined with transition supported, indetermined state will supported on future updates)
  • RadioButton (only button-like, WIP)
  • Ripples
  • ScrollBar (Modern and Mini supported)
  • Sliders
  • ToggleButton
  • ToggleSwitch (Clicked effect still not affected, will be fixed in future updates)
  • TextBoxes
  • and your custom widgets if you did compatibility :P

Material.Avalonia Wiki pages is still WIP (work in progress), Pages could not ready for show if they unclickable.

Main section

Widgets / Controls

Theming

Builders

Assist for widgets

Clone this wiki locally