1. <Canvas x:Name="a" Background="White" Loaded="LayoutRoot_Loaded">
  2.             <Canvas.Clip>
  3.                 <RectangleGeometry RadiusX="5" RadiusY="5" Rect="0,0, 300, 50" />
  4.             </Canvas.Clip>
  5.             <Canvas.Triggers>
  6.                 <EventTrigger RoutedEvent="Canvas.Loaded" >
  7.                     <BeginStoryboard>
  8.                         <Storyboard x:Name="animation" Storyboard.TargetProperty="(Canvas.Left)" RepeatBehavior="Forever" >
  9.                             <DoubleAnimation Storyboard.TargetName="ScrollingText" From="0" To="-820" Duration="0:0:20"  />
  10.                             <DoubleAnimation Storyboard.TargetName="ScrollingText2" From="820" To="0" Duration="0:0:20"  />
  11.                         </Storyboard>
  12.                     </BeginStoryboard>
  13.                 </EventTrigger>
  14.             </Canvas.Triggers>
  15.             <TextBlock x:Name="ScrollingText" FontFamily="Comic Sans MS" FontSize="36" Foreground="Green"  Text="I have downloaded the moded bios for the x200 which is revision 3.03. The new 3.05 Bios for x200 add some support for Windows 7. " />
  16.             <TextBlock x:Name="ScrollingText2" FontFamily="Comic Sans MS" FontSize="36" Foreground="Green" Text="I have downloaded the moded bios for the x200 which is revision 3.03. The new 3.05 Bios for x200 add some support for Windows 7. " />
  17.         </Canvas>


其中的重点就是用clip做出一个矩形将其与的部分隐藏了

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐