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>
  • 相关阅读:
    专业的GIS(电子地图、地理信息系统)在房地产行业的初步应用?
    Weka初步
    ViewPager用法
    相关分析和回归分析
    配置路线图RouteMap注意事项
    keyset与entryset
    Windows 应用程序结构
    Linux crontab 命令格式与具体样例
    java环境变量配置
    为什么你总成为不了架构师?
  • 原文地址:https://www.cnblogs.com/dxmfans/p/9434609.html
Copyright © 2011-2022 走看看