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>

  • 相关阅读:
    java设计模式-----3、抽象工厂模式
    java设计模式-----2、工厂方法模式
    java设计模式-----1、简单工厂模式
    解决windows10和ubuntu16.04双系统下时间不对的问题
    个人第二次作业-熟悉使用工具成绩汇总
    第二周助教小结——工作步入正轨
    第一周助教小结——助教工作初体验
    助教培训总结——熟练掌握GitHub及Git的使用方法
    助教培训总结——原型设计工具及练习
    助教培训总结——对学生任务博客的评分练习
  • 原文地址:https://www.cnblogs.com/chuncn/p/1749440.html
Copyright © 2011-2022 走看看