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

TranslateTransform animation in Flipper.FrontContent doesn't work properly #2505

Closed
Roberto2707 opened this issue Nov 29, 2021 · 6 comments · Fixed by #3431
Closed

TranslateTransform animation in Flipper.FrontContent doesn't work properly #2505

Roberto2707 opened this issue Nov 29, 2021 · 6 comments · Fixed by #3431
Labels
Milestone

Comments

@Roberto2707
Copy link

Hello.
After version 4.3.0-ci82, in Flipper.FrontContent, TranslateTransform animation doesn't work properly:

<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:WpfApp1"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        Title="MainWindow"
        Width="300" Height="300"
        WindowStartupLocation="CenterScreen"
        mc:Ignorable="d">

    <Window.Resources>
        <Storyboard x:Key="LoadWindow">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="txtUser" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                <EasingDoubleKeyFrame KeyTime="0" Value="800" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="800" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="AcceptButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                <EasingDoubleKeyFrame KeyTime="0" Value="800" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="800" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CancelButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                <EasingDoubleKeyFrame KeyTime="0" Value="800" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="800" />
                <EasingDoubleKeyFrame KeyTime="0:0:1.1" Value="0" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Window.Resources>

    <Window.Triggers>
        <EventTrigger RoutedEvent="Loaded">
            <BeginStoryboard Storyboard="{StaticResource LoadWindow}" />
        </EventTrigger>
    </Window.Triggers>

    <Grid Margin="10">
        <materialDesign:Flipper SnapsToDevicePixels="True">
            <materialDesign:Flipper.FrontContent>
                <StackPanel>
                    <TextBox x:Name="txtUser">
                        <TextBox.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform />
                                <SkewTransform />
                                <RotateTransform />
                                <TranslateTransform />
                            </TransformGroup>
                        </TextBox.RenderTransform>
                    </TextBox>

                    <Button x:Name="AcceptButton"
                            Margin="0,15,0,5"
                            materialDesign:ShadowAssist.ShadowDepth="Depth2" KeyboardNavigation.IsTabStop="False">
                        <Button.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform />
                                <SkewTransform />
                                <RotateTransform />
                                <TranslateTransform />
                            </TransformGroup>
                        </Button.RenderTransform>
                        <StackPanel Orientation="Horizontal">
                            <materialDesign:PackIcon Width="24" Height="24" Kind="AccountCheck" />
                            <TextBlock Margin="4,0,0,0" VerticalAlignment="Center" Text="Aceptar" />
                        </StackPanel>
                    </Button>

                    <Button x:Name="CancelButton"
                            Margin="0,5"
                            materialDesign:ShadowAssist.ShadowDepth="Depth2" KeyboardNavigation.IsTabStop="False">
                        <Button.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform />
                                <SkewTransform />
                                <RotateTransform />
                                <TranslateTransform />
                            </TransformGroup>
                        </Button.RenderTransform>
                        <StackPanel Orientation="Horizontal">
                            <materialDesign:PackIcon Width="24" Height="24" Kind="CloseBox" />
                            <TextBlock Margin="4,0,0,0" VerticalAlignment="Center" Text="Cancelar" />
                        </StackPanel>
                    </Button>
                </StackPanel>
            </materialDesign:Flipper.FrontContent>
        </materialDesign:Flipper>
    </Grid>
</Window>

Until version 4.3.0-ci82, the controls inside Flipper.FrontContent move from right to left until they were positioned on the left side, pretending to appear when loading the window. Now, they appear and are resized.

@Keboo Keboo added this to the 4.4.0 milestone Nov 29, 2021
@Keboo Keboo added the bug label Nov 29, 2021
@Keboo Keboo modified the milestones: 4.4.0, 4.5.0 Mar 13, 2022
@Roberto2707
Copy link
Author

Is there any way to download version 4.3.0-ci82 and next version 4.3.0-ci89 to check which is the problem?
I don't know if this is posible. In the new version 4.5.0 it is still not fixed. Thank you.

@Keboo Keboo modified the milestones: 4.5.0, 4.6.0 Apr 28, 2022
@Keboo
Copy link
Member

Keboo commented Apr 28, 2022

Sorry I had intended to bump out all of the open items from 4.5.0 to 4.6.0 after the release last night and forgot.

Yes, all version are available on NuGet.org.
https://www.nuget.org/packages/MaterialDesignThemes/
The simplest option is within Visual Studio you can open your NuGet package manager, and simply set it to show Preview NuGet packages. From there you can use the version drop down to select whichever versions you want.

Alternatively, under the Versions tab in NuGet.org you can pick specific versions.
This will let you download any specific version you want. You then need a local NuGet folder from which to install the NuGet from:
https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds

@Roberto2707
Copy link
Author

Hello. Thanks for answering. I already knew how to select different versions with nuget. This is what I'm doing to check if the problem is solved. What I was referring to is to download the MaterialDesignInXaml development to help find what had changed to try to fix it. Thanks again.

@Roberto2707
Copy link
Author

I think the problem is in the ViewPort3D that is used in Plane3D. In some version change in the PresentationFramework.dll assembly, in the System.Windows.Controls namespace.

@Roberto2707
Copy link
Author

Fixed in version 4.8.1-ci192

@Roberto2707
Copy link
Author

Hello. After version 5.01-ci598 it has malfunctioned again.

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

Successfully merging a pull request may close this issue.

2 participants