microsoft / XamlBehaviors

This is the official home for UWP XAML Behaviors on GitHub.
MIT License
708 stars 112 forks source link

Not Working Storyboard AutoReverse in Uno Platform #219

Open seo6107 opened 3 years ago

seo6107 commented 3 years ago

i use Uno.Microsoft.Xaml.Behaviors.WinUI.Managed

Storyboard AutoReverse is working in WinUI3 UWP

but not working Uno platform

this is my code

`<Image ~~~ x:Name="img1" Width="1280" Height="720" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Source="ms-appx:///Resources/~~" Stretch="Fill" Visibility="{Binding IsImageData, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}">

                                    <Interactivity:Interaction.Behaviors>
                                        <Core:EventTriggerBehavior EventName="Loaded">
                                            <Media:ControlStoryboardAction>
                                                <Media:ControlStoryboardAction.Storyboard>
                                                    <Storyboard AutoReverse="True" RepeatBehavior="Forever">
                                                        <DoubleAnimation
                                                            Storyboard.TargetName="img1"
                                                            Storyboard.TargetProperty="Opacity"
                                                            From="1"
                                                            To="0"
                                                            Duration="0:0:2" />
                                                    </Storyboard>
                                                </Media:ControlStoryboardAction.Storyboard>
                                            </Media:ControlStoryboardAction>
                                        </Core:EventTriggerBehavior>
                                    </Interactivity:Interaction.Behaviors>
                                    <!--<Image.Triggers>
                                        <EventTrigger RoutedEvent="Image.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard AutoReverse="True" RepeatBehavior="Forever">
                                                    <DoubleAnimation
                                                        Storyboard.TargetName="img1"
                                                        Storyboard.TargetProperty="Opacity"
                                                        From="1"
                                                        To="0"
                                                        Duration="0:0:2" />
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </Image.Triggers>-->
                                </Image>`
michael-hawker commented 5 days ago

@seo6107 you should test this against the latest Uno version. If it's still an issue, please report on their repository instead: https://github.com/unoplatform/uno