本篇文章给大家分享的是有关Silverlight3中怎么实现按路径运动,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。Code <Window&nbs
本篇文章给大家分享的是有关Silverlight3中怎么实现按路径运动,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。
Code <Window x:Class="SLTest.test"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="test" Height="600" Width="800">
<Window.Resources>
<Storyboard x:Key="Storyboard1">
<PointAnimationUsingPath Storyboard.TargetName="MyAnimatedEllipseGeometry" Storyboard.TargetProperty="Center" Duration="0:0:5" RepeatBehavior="Forever">
<PointAnimationUsingPath.PathGeometry>
<PathGeometry Figures="M 299.9 300 A 100,100 360 1 1 300.1,300 Z"/>
</PointAnimationUsingPath.PathGeometry>
</PointAnimationUsingPath>
</Storyboard>
</Window.Resources>
<Window.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
</EventTrigger>
</Window.Triggers>
<Grid>
<Path x:Name="pt" Stroke="Black" Fill="Gray" Data="M 299.9 300 A 100,100 360 1 1 300.1,300 Z" />
<Path Fill="Blue">
<Path.Data>
<!-- Describes an ellipse. -->
<EllipseGeometry x:Name="MyAnimatedEllipseGeometry"
Center="300,300" RadiusX="15" RadiusY="15" />
</Path.Data>
</Path>
</Grid>
</Window>
以上就是Silverlight3中怎么实现按路径运动,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注编程网精选频道。
--结束END--
本文标题: Silverlight3中怎么实现按路径运动
本文链接: https://www.lsjlt.com/news/292471.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-10
2024-05-10
2024-05-10
2024-05-10
2024-05-09
2024-05-09
2024-05-09
2024-05-09
2024-05-09
2024-05-09
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0