Can't use storyboard animation in xaml

oliver1oliver1 Member ✭✭

I'm trying to animate a property using a storyboard. I'm basing this off a tutorial article on the official docs website.

However storyboard and beginstoryboard are not recognized in my xaml file. For example if I copy paste

    <Button Name="myWidthAnimatedButton"
            Height="30" Width="200" HorizontalAlignment="Left">
            A Button   
            <Button.Triggers>

              <!-- Animates the width of the first button 
                   from 200 to 300. -->         
              <EventTrigger RoutedEvent="Button.Click">
                <BeginStoryboard>
                  <Storyboard>           
                    <DoubleAnimation Storyboard.TargetName="myWidthAnimatedButton"
                      Storyboard.TargetProperty="Width"
                      From="200" To="300" Duration="0:0:3" />
                  </Storyboard>
                </BeginStoryboard>
              </EventTrigger>
            </Button.Triggers>
          </Button>

It won't build and I'll get an error:
Type BeginStoryboard not found in xmlns ht tp://xa marin .c om/sche mas/2014/forms ResponderApp.iOS

Answers

Sign In or Register to comment.