none
关于Transform3D(我可能用了假3D😅) RRS feed

  • 问题

  • <Grid Background="{StaticResource ProcurePageBackground}">
            <Grid.Transform3D>
                <PerspectiveTransform3D Depth="1000" />
            </Grid.Transform3D>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <StackPanel HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Name="LeftGrid">
                <StackPanel.Transform3D>
                    <CompositeTransform3D CenterY="50" />
                </StackPanel.Transform3D>
                <Border Width="200"
                        Height="100"
                        BorderBrush="Red"
                        BorderThickness="4"
                        Background="#FF11321E">
                    <Border.Transform3D>
                        <CompositeTransform3D CenterY="100"></CompositeTransform3D>
                    </Border.Transform3D>
                    <TextBlock Text="1" />
                </Border>
                <Border Width="200"
                        Height="100"
                        BorderBrush="Black"
                        BorderThickness="4"
                        Background="#FF0B5B29">
                    <Border.Transform3D>
                        <CompositeTransform3D RotationX="90"></CompositeTransform3D>
                    </Border.Transform3D>
                    <TextBlock Text="2" />
                </Border>
                <Border Width="200"
                        Height="100"
                        BorderBrush="Yellow"
                        BorderThickness="4"
                        Background="#FF0B5B29">
                    <Border.Transform3D>
                        <CompositeTransform3D RotationX="180"
                                              TranslateZ="-100"
                                              TranslateY="-100"></CompositeTransform3D>
                    </Border.Transform3D>
                    <TextBlock Text="4" />
                </Border>
               
            </StackPanel>
        </Grid>

    这是代码,GIF下面:按道理,都在3D空间了,没道理还产生Zindex问题吧。望指点啊。😂

    2017年3月23日 6:46