ColorAnimation silverlight跑马灯效果

ColorAnimation silverlight跑马灯效果,第1张

概述前台代码: <UserControl x:Class="story.MainPage"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     xmlns:d="http://schemas

前台代码:@H_502_10@

<UserControl x:Class="story.MainPage"
    xmlns="
@H_502_10@http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="
@H_502_10@http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="
@H_502_10@http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="
@H_502_10@http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWIDth="400">
    <UserControl.Resources >
        <Storyboard  x:name="sb">
            <@R_419_6004@Animation Storyboard.Targetname="scBrush" Storyboard.TargetProperty="@R_419_6004@" From="Red" To="White" Duration="00:00:1" RepeatBehavior="Forever" ></@R_419_6004@Animation>
        </Storyboard>
        <Storyboard x:name="sb2">
            <DoubleAnimation  Storyboard.Targetname="gd1" Storyboard.TargetProperty="Offset" From="0" To="1" Duration="00:00:1" RepeatBehavior="Forever" >
               
            </DoubleAnimation>
        </Storyboard>
    </UserControl.Resources>
        <GrID x:name="LayoutRoot" Background="White">
        <StackPanel  WIDth="300" Height="300">
            <Ellipse WIDth="100" Height="100" name="el1">
                <Ellipse.Fill >
                    <SolID@R_419_6004@Brush x:name="scBrush"></SolID@R_419_6004@Brush>
                </Ellipse.Fill>
            </Ellipse>
            <TextBlock name="tb1" WIDth="200" Height="28" FontSize="24" Text="我在,世界在......">
              <TextBlock.Foreground >
                  <linearGradIEntBrush x:name="lb1">
                     <GradIEntStop Offset="0" @R_419_6004@="Black" ></GradIEntStop>
                      <GradIEntStop Offset="0.5" @R_419_6004@="Yellow"  x:name="gd1" ></GradIEntStop>
                      <GradIEntStop Offset="1" @R_419_6004@="Black" ></GradIEntStop>
                  </linearGradIEntBrush>
              </TextBlock.Foreground>
            </TextBlock>
            <button Content="开始" Height="23" HorizontalAlignment="left"  VerticalAlignment="Bottom" name="button1"  WIDth="75" Click="button1_Click" />
        </StackPanel>
           
       
    </GrID>
</UserControl>
@H_502_10@

@H_502_10@

后台代码:@H_502_10@

 private voID button1_Click(object sender,RoutedEventArgs e)         {             sb.Begin();             sb2.Begin();         }@H_502_10@

总结

以上是内存溢出为你收集整理的ColorAnimation silverlight跑马灯效果全部内容,希望文章能够帮你解决ColorAnimation silverlight跑马灯效果所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1064840.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存