Design view goes "Whoops" on my XAML code, but it will compile and run.
I posted a similar issue earlier, the difference here is that it runs properly.
Nonetheless, the design pane can't deal with it. Complains thusly
Error 9 Objects of type 'System.Windows.Media.Animation.BeginStoryboard' do not have child object collections. <my local path removed here>Window1.xaml 67 13 WinFxRotate
Here's the XAML (no C# code required).
<Windowx:Class="WinFxRotate.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"Title="WinFxRotate"Height="200"Width="300">
<
CanvasBackground="Gray"Height="200"Width="300"HorizontalAlignment="Center"> <!--Storyboards moved to root--><
StackPanelHorizontalAlignment="Center"><!--
Filler canvas. Use StackPanel--><
CanvasWidth="300"Height="25"HorizontalAlignment="Center"></
Canvas><
CanvasBackground="#00000000"Width="60"Height="60"Name="SpinCanvas"HorizontalAlignment="Center"><!--
Create the objects to animate.--><
EllipseName="Wheel"Canvas.Top="0"Canvas.Left="0"Fill="blue"Width="60"Height="60"Stroke="black"StrokeThickness="2"><
Ellipse.RenderTransform><
RotateTransformAngle="0"CenterX="25"CenterY="25" /></
Ellipse.RenderTransform></
Ellipse><
EllipseName="YellowFilter"Canvas.Top="44"Canvas.Left="24"Fill="Yellow"Width="12"Height="12"Stroke="black"StrokeThickness="1"></
Ellipse><
EllipseName="GreenFilter"Canvas.Top="4"Canvas.Left="24"Fill="Green"Width="12"Height="12"Stroke="black"StrokeThickness="1"></
Ellipse><
EllipseName="RedFilter"Canvas.Top="24"Canvas.Left="4"Fill="Red"Width="12"Height="12"Stroke="black"StrokeThickness="1"></
Ellipse><
EllipseName="WhiteFilter"Canvas.Top="24"Canvas.Left="44"Fill="White"Width="12"Height="12"Stroke="black"StrokeThickness="1"></
Ellipse><
EllipseName="Axle"Canvas.Top="28"Canvas.Left="28"Fill="Gray"Width="4"Height="4"Stroke="Black"StrokeThickness="1"></
Ellipse><
Canvas.RenderTransform><
RotateTransformAngle="0"CenterX="30"CenterY="30" /></
Canvas.RenderTransform></
Canvas><
CanvasWidth="300"Height="25"HorizontalAlignment="Center"></
Canvas><
StackPanelOrientation="Horizontal"HorizontalAlignment="Center"><!--
Create some buttons to control the animations.--><
ButtonName="startButton">Start</Button><
ButtonName="stopButton">Stop</Button><
StackPanel.Triggers><
EventTriggerRoutedEvent="Button.Click"SourceName="startButton"><
BeginStoryboardName="myBeginStoryboard"><
Storyboard><!--
This timeline is used to control the animations in this example.--><!--
Animate the angle of the RotateTransform from0 to 360 over 4 seconds.
--><
DoubleAnimationStoryboard.TargetName="SpinCanvas"Storyboard.TargetProperty="(Canvas.RenderTransform).(RotateTransform.Angle)"From="0"To="360"RepeatBehavior="Forever"Duration="0:0:1"/></
Storyboard></
BeginStoryboard></
EventTrigger><
EventTriggerRoutedEvent="Button.Click"SourceName="stopButton"><
StopStoryboardBeginStoryboardName="myBeginStoryboard" /></
EventTrigger></
StackPanel.Triggers></
StackPanel></
StackPanel></
Canvas></
Window>
