Skip to content
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

WIP MetroWindow: OverlayFadeIn / OverlayFadeOut #3162

Merged

Conversation

punker76
Copy link
Member

@punker76 punker76 commented Jan 18, 2018

What changed?

  • New OverlayFadeIn and OverlayFadeOut properties to set/override the overlay fade in/out Storyboards which are used for the Dialogs
  • Fix the fade in and out animation if no duration exists
  • Fix HideMetroDialogAsync which sometimes fails to close dialog (async call order)

Closed issues.

Closes #2825
Closes #3022

@punker76 punker76 added this to the 1.6.0 milestone Jan 18, 2018
@punker76 punker76 self-assigned this Jan 18, 2018
@punker76 punker76 merged commit de6311a into develop Jan 20, 2018
@punker76 punker76 deleted the feature/GH-2825_OverlayFadeIn_OverlayFadeOut_Storyboards branch January 20, 2018 22:56
@punker76 punker76 added the Bug label Feb 11, 2018
@GF-Huang
Copy link

GF-Huang commented Feb 1, 2019

Hi @punker76 , is there an example for using OverlayFadeIn and OverlayFadeOut ?
I want to make the CustomDialog show animation shorter but not disabled.

@punker76
Copy link
Member Author

punker76 commented Feb 1, 2019

@greatfirewall OverlayFadeIn and OverlayFadeOut are properties at the MetroWindow, so simply set a new Storyboard and it will use it.

Here are the 2 standard Storyboards

<Storyboard x:Key="OverlayFastSemiFadeIn"
AccelerationRatio=".97"
BeginTime="0:0:0"
SpeedRatio="2.7"
Storyboard.TargetProperty="Opacity">
<DoubleAnimation To=".7" />
</Storyboard>
<Storyboard x:Key="OverlayFastSemiFadeOut"
AccelerationRatio=".97"
BeginTime="0:0:0"
SpeedRatio="2.7"
Storyboard.TargetProperty="Opacity">
<DoubleAnimation To="0.0" />
</Storyboard>

@GF-Huang
Copy link

GF-Huang commented Feb 1, 2019

@punker76 thanks.

@GF-Huang
Copy link

GF-Huang commented Feb 1, 2019

I had try change the AccelerationRatio and SpeedRatio but no effect.
So should I add a Duration attribute ?

@punker76
Copy link
Member Author

punker76 commented Feb 1, 2019

@greatfirewall And you did set the new Storyboards to the both propetries?

@GF-Huang
Copy link

GF-Huang commented Feb 1, 2019

Sorry my fault, now works well. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

HideMetroDialogAsync sometimes fails to close dialog Shorten Dialog Show/Hide animation duration
2 participants