Storyboard within ""BeginStoryboard"" of an ""EventTrigger"" is not Suppported
For example the following will not work in the designer:
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="CiderWindowsApplication2.EmbeddedStoryboardExample"
Title="Storyboard Example Embedded in an EventTrigger">
<!--Example of Storyboard Embedded into an [EventTrigger-->]
<Canvas Background="Ivory">
<Rectangle Width="100" Height="50" Fill="DodgerBlue" Margin="10">
<Rectangle.Triggers>
[<EventTrigger] RoutedEvent="Canvas.Loaded">
[<BeginStoryboard>]
<Storyboard>
[<DoubleAnimation] From="50" To="300" Duration="0:0:4"
RepeatBehavior="Forever" AutoReverse="True"
Storyboard.TargetProperty="(Canvas.Width)" />
</Storyboard>
[</BeginStoryboard>]
[</EventTrigger>]
</Rectangle.Triggers>
</Rectangle>
</Canvas>
</Window>
But surrounding the @<Storyboard>@ with a
@<BeginStoryboard.Storyboard>@ tag will work as in,
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="CiderWindowsApplication2.EmbeddedStoryboardExample"
Title="Storyboard Example Embedded in an EventTrigger">
<!--Example of Storyboard Embedded into an [EventTrigger-->]
<Canvas Background="Ivory">
<Rectangle Width="100" Height="50" Fill="DodgerBlue" Margin="10">
<Rectangle.Triggers>
[<EventTrigger] RoutedEvent="Canvas.Loaded">
[<BeginStoryboard>]
[<BeginStoryboard.Storyboard>]
<Storyboard>
[<DoubleAnimation] From="50" To="300" Duration="0:0:4"
RepeatBehavior="Forever" AutoReverse="True"
Storyboard.TargetProperty="(Canvas.Width)" />
</Storyboard>
[</BeginStoryboard.Storyboard>]
[</BeginStoryboard>]
[</EventTrigger>]
</Rectangle.Triggers>
</Rectangle>
</Canvas>
</Window>