WPF之跳动字体链接

1引用资源

     <Storyboard x:Key="logoAyStory" RepeatBehavior="Forever">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="textBlock">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-9"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="textBlock1">
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-1.5"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="-9"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="textBlock2">
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-1.333"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="-9"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="textBlock3">
                <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="-9"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:3" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

 

 <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard x:Name="logoAyStory_BeginStoryboard" Storyboard="{StaticResource logoAyStory}"/>
            <BeginStoryboard x:Name="logoAyStory_BeginStoryboard1" Storyboard="{StaticResource logoAyStory1}"/>
        </EventTrigger>

 

2创建

 

 <StackPanel Orientation="Horizontal" Canvas.Left="121" Canvas.Top="40" SnapsToDevicePixels="True" UseLayoutRounding="True" MouseLeftButtonDown="clickLogin_MouseLeftButtonDown" x:Name="clickLogin" Visibility="Hidden">
                        <TextBlock x:Name="textBlock"  TextWrapping="Wrap" Text="点"  FontSize="14"  Foreground="White" UseLayoutRounding="True" RenderTransformOrigin="0.5,0.5">
                            <TextBlock.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </TextBlock.RenderTransform>
                        </TextBlock>
                        <TextBlock x:Name="textBlock1"  TextWrapping="Wrap" Text="我"  FontSize="14" Margin="3,0,0,0" UseLayoutRounding="True" Foreground="White" RenderTransformOrigin="0.5,0.5">
                            <TextBlock.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </TextBlock.RenderTransform>
                        </TextBlock>
                        <TextBlock x:Name="textBlock2"  TextWrapping="Wrap" Text="登"  FontSize="14" Margin="3,0,0,0" UseLayoutRounding="True" Foreground="White" RenderTransformOrigin="0.5,0.5">
                            <TextBlock.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </TextBlock.RenderTransform>
                        </TextBlock>
                        <TextBlock x:Name="textBlock3"  TextWrapping="Wrap" Text="陆"  FontSize="14" Margin="3,0,0,0" UseLayoutRounding="True" Foreground="White" RenderTransformOrigin="0.5,0.5">
                            <TextBlock.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </TextBlock.RenderTransform>
                        </TextBlock>
                    </StackPanel>
               

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值