zoukankan      html  css  js  c++  java
  • A Rotating Wireframe Cubesilverilght4简易魔方

    <UserControl x:Class="SilverlightApplication1.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        d:DesignHeight="300" d:DesignWidth="400" xmlns:my="clr-namespace:Liquid;assembly=Liquid.Popup" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
        <UserControl.Resources>
            <Style TargetType="Rectangle" x:Key="rectangleStyle">
                <Setter Property="Width" Value="200" />
                <Setter Property="Height" Value="200" />
                <Setter Property="Stroke" Value="Blue" />
                <Setter Property="StrokeThickness" Value="4" />
            </Style>
        </UserControl.Resources>

        <Grid x:Name="LayoutRoot" Background="White">
            <Grid HorizontalAlignment="Center"
                  VerticalAlignment="Center">
                <Rectangle Style="{StaticResource rectangleStyle}" Fill="Red" Opacity="0.5">
                    <Rectangle.Projection>
                        <PlaneProjection x:Name="front"
                                         LocalOffsetZ="100"
                                         RotationX="30" />
                    </Rectangle.Projection>
                </Rectangle>

                <Rectangle Style="{StaticResource rectangleStyle}" Fill="Yellow" Opacity="0.5">
                    <Rectangle.Projection>
                        <PlaneProjection x:Name="top"              
                                         LocalOffsetZ="100"
                                         RotationX="-60" />
                    </Rectangle.Projection>
                </Rectangle>

                <Rectangle Style="{StaticResource rectangleStyle}"  Fill="Blue" Opacity="0.5">
                    <Rectangle.Projection>
                        <PlaneProjection x:Name="bottom"
                                         LocalOffsetZ="100"
                                         RotationX="120" />
                    </Rectangle.Projection>
                </Rectangle>

                <Rectangle Style="{StaticResource rectangleStyle}" Fill="Green" Opacity="0.5">
                    <Rectangle.Projection>
                        <PlaneProjection x:Name="back"
                                         LocalOffsetZ="-100"
                                         RotationX="30" />
                    </Rectangle.Projection>
                </Rectangle>
            </Grid>
        </Grid>

        <UserControl.Triggers>
            <EventTrigger>
                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation Storyboard.TargetName="front"
                                         Storyboard.TargetProperty="RotationY"
                                         By="360" Duration="0:0:8"
                                         RepeatBehavior="Forever" />

                        <DoubleAnimation Storyboard.TargetName="top"
                                         Storyboard.TargetProperty="RotationY"
                                         By="360" Duration="0:0:8"
                                         RepeatBehavior="Forever" />

                        <DoubleAnimation Storyboard.TargetName="bottom"
                                         Storyboard.TargetProperty="RotationY"
                                         By="360" Duration="0:0:8"
                                         RepeatBehavior="Forever" />

                        <DoubleAnimation Storyboard.TargetName="back"
                                         Storyboard.TargetProperty="RotationY"
                                         By="360" Duration="0:0:8"
                                         RepeatBehavior="Forever" />
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </UserControl.Triggers>

    </UserControl>

  • 相关阅读:
    git 比较两个分支日志和文件的差异
    Interspeech 2020调研:文本前端
    centOS 7 修改分辨率、图形与命令行界面切换
    pdf表格提取camelot安装教程
    CFS任务的负载均衡——2
    CFS任务的负载均衡(框架篇)——(1)
    ftrace笔记一
    红黑树rbtree学习笔记
    一. scheduler相关结构体简介
    cpu_capacity、task_util、cpu_util计算方法
  • 原文地址:https://www.cnblogs.com/chuncn/p/1749440.html
Copyright © 2011-2022 走看看