情感禁区110 情感禁区110
关注数: 23 粉丝数: 20 发帖数: 396 关注贴吧数: 5
怎么动不起来,初学者 <Window x:Class="Animation_Using_KeyFrames.MainWindow" xmlns="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fschemas.microsoft.com%2Fwinfx%2F2006%2Fxaml%2Fpresentation&urlrefer=0ad3876ba330e810a839d62703fde887" xmlns:x="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fschemas.microsoft.com%2Fwinfx%2F2006%2Fxaml&urlrefer=59355275054133f326fcc2c58d71e9e1" xmlns:d="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fschemas.microsoft.com%2Fexpression%2Fblend%2F2008&urlrefer=0216b2382ea90b018f990446eb189ed6" xmlns:mc="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fschemas.openxmlformats.org%2Fmarkup-compatibility%2F2006&urlrefer=c730a5b4cfc0ca27be282fab96cea80d" xmlns:local="clr-namespace:Animation_Using_KeyFrames" mc:Ignorable="d" Title="MainWindow" Height="350" Width="525"> <Grid> <Canvas> <Ellipse Fill="Red" Canvas.Top="0" Canvas.Left="0" Width="84" Height="50" > <Ellipse.RenderTransform> <TranslateTransform X="100" Y="100" x:Name="ellipseMove" /> </Ellipse.RenderTransform> <Ellipse.Triggers> <EventTrigger RoutedEvent="Ellipse.Loaded"> <BeginStoryboard> <Storyboard> <PointAnimationUsingKeyFrames Storyboard.TargetName="MyEllise" Storyboard.TargetProperty="Center" RepeatBehavior="Forever" > <LinearPointKeyFrame KeyTime="00:00:00" Value="50,50"/> <LinearPointKeyFrame KeyTime="00:00:01" Value="100,50"/> <LinearPointKeyFrame KeyTime="00:00:02" Value="100,100"/> <LinearPointKeyFrame KeyTime="00:00:03" Value="50,100"/> <LinearPointKeyFrame KeyTime="00:00:04" Value="50,50"/> </PointAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger> </Ellipse.Triggers> </Ellipse> </Canvas> </Grid> </Window>
1 下一页