zoukankan      html  css  js  c++  java
  • WPF RenderTransform的使用

    呈现变形的元素并没有改变位置,只是呈现在不同的位置而已,所以动画要用呈现变形

    好处:为了效率,如果改变位置的话,需要重新测量,布局

    <Window x:Class="wpf180709.MainWindow"

            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="MainWindow" Height="509.067" Width="569.776">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Button Width="80" Height="80" HorizontalAlignment="Left" VerticalAlignment="Top" Content="Hello">
                <Button.RenderTransform>
                    <TransformGroup>
                        <RotateTransform CenterX="40" CenterY="40" Angle="45"></RotateTransform>
                        <TranslateTransform X="300" Y="300"></TranslateTransform>
                    </TransformGroup>
                </Button.RenderTransform>

            </Button>
        </Grid>
    </Window>
  • 相关阅读:
    spring缓存笔记 半注解版
    乐优商城项目视频及源码
    spring cloud Eureka
    idea+maven搭建ssh,支持事务,无hibernate文件整合
    BUU->CRYPTO 知识点分类
    file-upl0ad
    [RoarCTF 2019]Simple Upload
    BUU UPLOAD COURSE 1
    [GXYCTF2019]Ping Ping Ping
    [SWPU2019]Web1
  • 原文地址:https://www.cnblogs.com/dxmfans/p/9434609.html
Copyright © 2011-2022 走看看