3D Perspective - 실버라이트3에 새롭게 추가된 기능 - Full 3D가 아닌 2D객체를 3D 공간에 배치하여 마치 3D 객체인 것처럼 보이게 하는 기능입니다 - 일반적인 3D에서는 객체를 두고 카메라의 위치를 변경 하지만, Perspective 3D 에서는 객체를 회전하여 3D효과를 나타냅니다 |
- Rotation(X,Y,Z) 프로퍼티 : 회전 각도 설정 - CenterOfRotation(X,Y,Z) 프로퍼티 : 방향의 회전축 설정 - GlobalOffset(X,Y,Z) 프로퍼티 : 중심 객체 이동 -LocalOffset(X,Y,Z) 프로퍼티 : 중심 객체 이동 |
Perspective.Xaml <UserControl x:Class="PlaneProjectionExample.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:DesignWidth="640" d:DesignHeight="480"> <StackPanel x:Name="LayoutRoot" <StackPanel Width="300" Height="200" <StackPanel.Projection> <!-- PlaneProjection 프로퍼티 --> <PlaneProjection x:Name="planeProjection" /> </StackPanel.Projection> <TextBlock Text="PlaneProject Example" /> <TextBlock Text="Input Text" /> <Button Content="버튼" /> <Ellipse Width="50" Height="50" Fill="Blue"/> </StackPanel> <!-- 카테고리 --> <StackPanel Orientation="Horizontal" Margin="0,50,0,0"> <TextBlock Text="Category" Width="150" TextAlignment="Center"/> <TextBlock Text="X" Width="150" TextAlignment="Center"/> <TextBlock Text="Y" Width="150" TextAlignment="Center"/> <TextBlock Text="Z" Width="150" TextAlignment="Center"/> </StackPanel> <!-- Rotation 그룹 --> <StackPanel Orientation="Horizontal"> <TextBlock Text="Rotation" Width="150" TextAlignment="Center"/> <!-- Rotation(X, Y, Z) 프로퍼티 데이터 바인딩 --> <Slider x:Name="RotationX" Width="150" Minimum="0" Maximum="360" Value="{Binding RotationX, <Slider x:Name="RotationY" Width="150" Minimum="0" Maximum="360" Value="{Binding RotationY, <Slider x:Name="RotationZ" Width="150" Minimum="0" Maximum="360" Value="{Binding RotationZ, </StackPanel> <!-- CenterOfRotation 그룹 --> <StackPanel Orientation="Horizontal"> <TextBlock Text="CenterOfRotation" Width="150" TextAlignment="Center"/> <!-- CenterOfRotation(X, Y, Z) 데이터 바인딩 --> <Slider x:Name="CenterOfRotationX" Width="150" Minimum="0" Maximum="1" Value="{Binding CenterOfRotationX, ElementName=planeProjection, Mode=TwoWay}"/> <Slider x:Name="CenterOfRotationY" Width="150" Minimum="0" Maximum="1" Value="{Binding CenterOfRotationY, ElementName=planeProjection, Mode=TwoWay}"/> <Slider x:Name="CenterOfRotationZ" Width="150" Minimum="0" Maximum="1" Value="{Binding CenterOfRotationZ, ElementName=planeProjection, Mode=TwoWay}"/> </StackPanel> <!-- GlobalOffset 그룹--> <StackPanel Orientation="Horizontal"> <TextBlock Text="GlobalOffset" Width="150" TextAlignment="Center"/> <!-- GlobalOffset(X, Y, Z) 데이터 바인딩 --> <Slider x:Name="GlobalOffsetX" Width="150" Minimum="-50" Maximum="50" Value="{Binding GlobalOffsetX, <Slider x:Name="GlobalOffsetY" Width="150" Minimum="-50" Maximum="50" Value="{Binding GlobalOffsetY, <Slider x:Name="GlobalOffsetZ" Width="150" Minimum="-50" Maximum="50" Value="{Binding GlobalOffsetZ, </StackPanel> <!-- LocalOffset 그룹 --> <StackPanel Orientation="Horizontal"> <TextBlock Text="LocalOffset" Width="150" TextAlignment="Center"/> <!-- LocalOffset(X, Y, Z) 데이터 바인딩. --> <Slider x:Name="LocalOffsetX" Width="150" Minimum="-50" Maximum="50" Value="{Binding LocalOffsetX, <Slider x:Name="LocalOffsetY" Width="150" Minimum="-50" Maximum="50" Value="{Binding LocalOffsetY, <Slider x:Name="LocalOffsetZ" Width="150" Minimum="-50" Maximum="50" Value="{Binding LocalOffsetZ, </StackPanel> </StackPanel> </UserControl> |
'.Net Project > SilverLight 3.0' 카테고리의 다른 글
34장) 단일항목을 표시하는 컨트롤 (ContentControl) (0) | 2009.11.27 |
---|---|
33장) 실버라이트 텍스트 컨트롤(TextBlock, TextBox, PasswordBox) (0) | 2009.11.27 |
31장) 실버라이트 2D Transform Group (Transform Group) (0) | 2009.11.27 |
30장) 실버라이트 2D SkewTransform (Skew Transfrom) (0) | 2009.11.27 |
29장) 실버라이트 2D ScaleTransform (ScaleTransform) (0) | 2009.11.27 |