Skip to content

Should share storyboard is paused between all ControlStoryboardAction instances.#107

Open
h82258652 wants to merge 7 commits into
microsoft:mainfrom
h82258652:fix_ControlStoryboardAction_IsPaused
Open

Should share storyboard is paused between all ControlStoryboardAction instances.#107
h82258652 wants to merge 7 commits into
microsoft:mainfrom
h82258652:fix_ControlStoryboardAction_IsPaused

Conversation

@h82258652

Copy link
Copy Markdown

if two or more ControlStoryboardAction instances use the same storyboard, is paused will be wrong.

@skendrot

Copy link
Copy Markdown
Collaborator

Is there an issue for this PR? Do you have a use case for this PR?

@h82258652

Copy link
Copy Markdown
Author

@skendrot

        <CommandBar>
            <CommandBar.Resources>
                <Storyboard x:Key="RefreshingStoryboard">
                    <DoubleAnimation RepeatBehavior="Forever"
                                     Storyboard.TargetName="RefreshIcon"
                                     Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
                                     From="0"
                                     To="360"
                                     Duration="0:0:1" />
                </Storyboard>
            </CommandBar.Resources>
            <AppBarButton Label="Refresh">
                <interactivity:Interaction.Behaviors>
                    <core:DataTriggerBehavior Binding="{Binding Path=IsBusy}"
                                              Value="True">
                        <media:ControlStoryboardAction ControlStoryboardOption="TogglePlayPause"
                                                       Storyboard="{StaticResource RefreshingStoryboard}" />
                    </core:DataTriggerBehavior>
                    <core:DataTriggerBehavior Binding="{Binding Path=IsBusy}"
                                              Value="False">
                        <media:ControlStoryboardAction ControlStoryboardOption="Pause"
                                                       Storyboard="{StaticResource RefreshingStoryboard}" />
                    </core:DataTriggerBehavior>
                </interactivity:Interaction.Behaviors>
                <AppBarButton.Icon>
                    <SymbolIcon x:Name="RefreshIcon"
                                RenderTransformOrigin="0.5,0.5"
                                Symbol="Refresh">
                        <SymbolIcon.RenderTransform>
                            <RotateTransform />
                        </SymbolIcon.RenderTransform>
                    </SymbolIcon>
                </AppBarButton.Icon>
            </AppBarButton>
        </CommandBar>

When IsBusy is true, the storyboard should be continue to play. But in fact, it don't work for me.

By the way, is this project still alive? The nuget package had 6 months no update.

@mgoertz-msft

Copy link
Copy Markdown
Member

It sure is alive. We listen to you guys when it is time to produce another NuGet update. We have heard request recently and put it on our backlog. Due to higher priority issues though we haven't been able to do so yet.

@microsoft microsoft deleted a comment from msftclas Sep 26, 2017
@h82258652

h82258652 commented Oct 28, 2020

Copy link
Copy Markdown
Author

Link this to microsoft/microsoft-ui-xaml#3103

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants