I saw there was a post about this several years back, but the OP never followed up..
I am getting the " System.Windows.Media.Animation Warning: 6 : Unable to perform action because the specified Storyboard was never applied to this object for interactive control.; Action='Stop'; Storyboard='System.Windows.Media.Animation.Storyboard'; Storyboard.HashCode='11303829'; Storyboard.Type='System.Windows.Media.Animation.Storyboard'; TargetElement='System.Windows.Media.Animation.Storyboard'; TargetElement.HashCode='11303829'; TargetElement.Type='System.Windows.Media.Animation.Storyboard' "
I have tried everything I can think of (hopefully not missing something small and silly..).
Here is the storyboard itself in the UserCont
<Storyboard x:Key="FlashingPanel" RepeatBehavior="Forever" AutoReverse="True"> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="TaskPanelItem"> <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="0" /> </DoubleAnimationUsingKeyFrames></Storyboard>
Here is the 'grid' section that utilizes the storyboard.
<Grid Grid.Column="1" Grid.Row="1"> <telerik:RadPanelBar x:Name="TaskRadPanel" Background="{StaticResource UserControlbackground}" Width="Auto" Height="Auto" Orientation="Horizontal" Margin="5, 8, 5, 10" BorderBrush="Transparent" FocusVisualStyle="{x:Null}" ItemContainerStyle="{StaticResource TaskRadPanelItemStyle}"> <telerik:RadPanelBarItem x:Name="TaskPanelItem" HeaderTemplate="{StaticResource MyTaskHeaderTemplate}" HorizontalContentAlignment="Right"> <telerik:RadPanelBarItem.Triggers> <EventTrigger RoutedEvent="FrameworkElement.Loaded"> <EventTrigger.Actions> <BeginStoryboard x:Name="MyFlashingStory" Storyboard.TargetName="TaskPanelItem" Storyboard="{StaticResource FlashingPanel}"/> </EventTrigger.Actions> </EventTrigger> </telerik:RadPanelBarItem.Triggers> <i:Interaction.Triggers> <ei:DataTrigger Binding="{Binding MyTeamHasTasks, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Value="True"> <ei:ControlStoryboardAction Storyboard="{StaticResource FlashingPanel}" ControlStoryboardOption="Play" /> </ei:DataTrigger> <ei:DataTrigger Binding="{Binding MyTeamHasTasks, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Value="False"> <ei:ControlStoryboardAction Storyboard="{StaticResource FlashingPanel}" ControlStoryboardOption="Pause" /> </ei:DataTrigger> <i:EventTrigger EventName="Expanded" SourceName="TaskPanelItem"> <ei:ControlStoryboardAction Storyboard="{StaticResource FlashingPanel}" ControlStoryboardOption="Stop" /> </i:EventTrigger> <i:EventTrigger EventName="Collapsed" SourceName="TaskPanelItem"> <ei:ControlStoryboardAction Storyboard="{StaticResource FlashingPanel}" ControlStoryboardOption="Play" /> </i:EventTrigger> </i:Interaction.Triggers> <telerik:RadListBox ItemsSource="{Binding MyTeamTaskList}" > <telerik:RadListBox.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Vertical" /> </ItemsPanelTemplate> </telerik:RadListBox.ItemsPanel> <telerik:RadListBox.ItemTemplate> <DataTemplate> <Grid> <TextBlock Text="{Binding Description}" FontFamily="Sengo UI" FontSize="14" VerticalAlignment="Center" Foreground="RoyalBlue" /> </Grid> </DataTemplate> </telerik:RadListBox.ItemTemplate> </telerik:RadListBox> </telerik:RadPanelBarItem> </telerik:RadPanelBar> </Grid>
MyTeamHasTasks is a boolean in my ViewModel.
First EventTrigger Expanded: ControlStoryboardAction: Stop - Throws System.Windows.Media.Animation Warning: 6.
Second EventTrigger Collapsed: ControlStoryboardAction: Play - Works fine.
If I expand the TaskPanel again (firing the first eventtrigger from above) everything works as it should at this point and on..
BUT the VERY first time the ControlStoryboardAction: Stop is executed, it gives the System.Windows.Media.Animation Warning: 6.
For testing purposes, I replaced the binding boolean field (MyTeamHasTasks) with a checkbox and then bound the checkbox to the boolean field (MyTeamHasTasks), this route does not give me any issues... Makes me wonder why it doesn't work they way I initially implemented it as it achieves the same thing.
Any idea as to how I can get around this? I do not think this is a bug, I feel like I have possibly not implemented this accurately.
I'd like to do this without ANY code-behind.
