Perspective 3D
.NET프로그래밍/Silverlight 3.0 2009. 11. 27. 09:22 |
--> 아래 그림과 같이 '솔루션 탐색기'에 '이미지파일'인 "Lighthouse.jpg"를 추가한다.
[MainPage.xaml]
<UserControl x:Class="RiaPerspective3D.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">
<Grid x:Name="LayoutRoot" Background="White">
<StackPanel Orientation="Vertical">
<Grid HorizontalAlignment="Left"
Margin="20,10,20,10">
<Rectangle Fill="#ffaaaaaa" RadiusX="5" RadiusY="5"/>
<StackPanel x:Name="SliderContainer" Orientation="Horizontal"
HorizontalAlignment="Stretch" Margin="10">
<TextBlock Text="이미지 회전" Foreground="White" />
<Slider x:Name="slider" Minimum="0" Maximum="360"
Value="{Binding RotationX, Mode=TwoWay, ElementName=imageRotation}"
Width="400"/>
<TextBlock x:Name="sliderValue"
Text="{Binding Value, ElementName=slider}"
Foreground="White" />
</StackPanel>
</Grid>
<Image x:Name="image" Source="Lighthouse.jpg" Width="500" Height="500">
<Image.Projection>
<PlaneProjection x:Name="imageRotation" RotationY="45" />
</Image.Projection>
</Image>
</StackPanel>
</Grid>
</UserControl>
-------------------------------------------------------------------------------------
[실행결과]
'.NET프로그래밍 > Silverlight 3.0' 카테고리의 다른 글
Canvas.ZIndex (사각형(도형) 포개는 순서 바꾸기) (0) | 2009.12.01 |
---|---|
Canvas.Left와 Canvas.Top (0) | 2009.12.01 |
Transforms 요소 - <TransformGroup /> : UI 요소에 여러 개의 변형 기능 적용 (0) | 2009.11.27 |
Transforms 요소 - <SkewTransform /> : UI 요소 기울이기 (0) | 2009.11.27 |
Transforms 요소 - <ScaleTransform /> : UI 요소 크기 늘리거나 줄이기 (0) | 2009.11.27 |