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

Expander fix closing animation #2769

Merged
merged 4 commits into from
Dec 18, 2016
Merged

Conversation

Anapher
Copy link
Contributor

@Anapher Anapher commented Dec 17, 2016

Fix the closing animation of the expander, it was not executed because the expander was directly collapsed. The closing animation duration was also made smaller because 250 ms was too long (changed to 100 ms, better in my feeling).

alkalinee and others added 4 commits August 5, 2016 18:43
Fix the closing animation of the expander, it was not executed because
the expander was directly collapsed. The closing animation duration was
also made smaller because 250 ms was too long (in my feeling)
@punker76 punker76 added this to the 1.4.0 milestone Dec 18, 2016
@punker76 punker76 merged commit 9f6799e into MahApps:develop Dec 18, 2016
@punker76
Copy link
Member

@alkalinee Thx! I revert the duration for the collapse animation to 250. But you can simply change it now by yourself in your app like this

<!--  quick change of the collapse storyboard duration  -->
<Storyboard x:Key="MetroExpanderCollapseStoryboard">
    <DoubleAnimation Duration="0:0:0.1"
                        Storyboard.TargetName="ExpandSite"
                        Storyboard.TargetProperty="(UIElement.Opacity)"
                        To="0" />
    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(UIElement.Visibility)">
        <DiscreteObjectKeyFrame KeyTime="0:0:0.1" Value="{x:Static Visibility.Collapsed}" />
    </ObjectAnimationUsingKeyFrames>
</Storyboard>

@punker76
Copy link
Member

@alkalinee I revert the dynamic resource search for the Storyboard, cause if you don't put the MahApps resources to the App.xaml you will get a XamlParseException. So for now it's not so easy to change the duration for this Storyboard. I'll investigate for next releases what we can do...

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

Successfully merging this pull request may close these issues.

3 participants