Tech/Silverlight2009. 6. 18. 19:05
Silverligh 3의 UI Element에 Projection 프라퍼티가 추가되었다. 
이를 이용하면 간단한 3D 효과를 구현할 수 있다.

Image와 Button을 각각 Y축으로 30도 Z축으로 35도 회전하는 것을 다음과 같은 코드로 구현할 수 있다.

<Image x:Name="myImage" Source="[0253].jpg">
<Image.Projection>
<PlaneProjection RotationY="30"/>
</Image.Projection>
</Image>

<Button Content="Button" Click="Button_Click">
<Button.Projection>
<PlaneProjection RotationZ="35" />
</Button.Projection>
</Button>


Projection에서 제공하는 것은 회전 x,y,z 축 회전 외에도 다음과 같은 것들이 있다.
- 회전 중심점 변경 (CenterOf...)
- 회전 축 고정 평행 이동 (GlobalOffset...)
- 회전 축 변경 평형 이동 (LocalOffset...)

'Tech > Silverlight' 카테고리의 다른 글

[MVVM/Command Pattern]  (0) 2009.10.01
Deep Zoom Composer 에서 개별 이미지 요소 정보 얻기  (0) 2009.08.03
ImageButton 만들기  (0) 2009.06.11
Silverlight2 Unit Test  (0) 2009.05.19
Posted by 알 수 없는 사용자