Windows Phone 7에서는 세로모드(portrait)와 가로모드(landscape)를 지원하는데 기본적으로는 portrait모드로 설정되어있습니다.

이 Orientation은 페이지별로 설정가능하며 xaml과 Behind code에서 SupportedOrientations 값을 이용해서 설정할 수 있으며 설정될 수 있는 값은 각각 Portrait, LandscapePortraitOrLandscape입니다.

아래 코드는 각각 xaml과 Behind code(C#)를 이용해서 프로그램에서 지원할 Orientation을 설정하는 코드입니다.

//xaml
SupportedOrientations="Portrait"
SupportedOrientations="Landscape"
SupportedOrientations="PortraitOrLandscape"

//Behind code(C#)
this.SupportedOrientations = SupportedPageOrientation.Portrait;
this.SupportedOrientations = SupportedPageOrientation.Landscape;
this.SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;
Posted by Gungume
,