English 中文(简体)
如何确定视窗电话7的取向?
原标题:How to determine orientation of Windows Phone 7?

你们怎么能说明,该装置是纵向(港口)还是横向(土地替罪羊)?

是否有简化这种限制的持久性有机污染物,或者你是否必须用速计“手头”来决定?

最佳回答

我本人仅看窗7部电话(通过vs2010号电话版)。

这似乎在法典中存在。

 public MainPage()
        {
            InitializeComponent();
            // seems to set the supported orientations that your program will support.
            SupportedOrientations = SupportedPageOrientation.Portrait | SupportedPageOrientation.Landscape;
        }

然后,实际形式

  private void PhoneApplicationPage_OrientationChanging(object sender, OrientationChangedEventArgs e)
        {
            var test = e.Orientation;

        }

因此,当方向发生变化时,方向就会告诉你方向是什么。 同景观权利一样。

问题回答

另外,你也不必通过这一活动来追踪这一情况,你可以直接要求电话申请会:

private void Button_Click(object sender, RoutedEventArgs e)
{
    MyCurrentOrientation.Text = this.Orientation.ToString();
}

你们也可以通过这种方式提出。 你提出申请时的取向使你知道方向是什么。 无论从哪一开始,你都可以利用“定向”活动。

阁下:

OrientationChanged += new EventHandler<OrientationChangedEventArgs>(MainPage_OrientationChanged);

void MainPage_OrientationChanged(object sender, OrientationChangedEventArgs e)

{

   Console.WriteLine(e.Orientation.ToString());

}




相关问题
System.Json namespace missing from Windows Phone 7

During a Mix10 presentation, the presenter (Charlie Kindel) said that when writing Silverlight based apps for WP7 you get all of Silverlight 3.0 with some of Silverlight 4.0 mixed in. Why then is ...

Will Windows Phone 7 Support Multitasking third party apps

Obviously it s early days, I do not know whether this is information that is in the public domain or not yet, but... I have trawled through some of this site - http://www.windowsphone7series.com/ but ...

Windows Series Phone 7 "Cloud"

I have been reading up on "Cloud computing" on here and still not getting it. Basically I want to develop for the WP7 http://msdn.microsoft.com/en-us/library/ff402531%28v=VS.92%29.aspx#...

Windows Phone 7 Tab Pages (page cycle)

I know.. I know, it s only a few hours old. But how the hell do you get the little page tabbing/cycle (forgot what the official name is) on the top of the page under the app title. MIX Keynotes made ...

Recording audio from the microphone in Windows Phone 7 Series

I m wondering if anyone has any code samples or links to documentation that demonstrate how to capture audio from the device s microphone on the new Windows Phone Series 7. I ve recently downloaded ...

Resources for Windows Phone 7 development [closed]

Windows Phone 7 has been unveiled and MS have announced all details of the development chain at the Mix10 conference. So this could be a good starting point/collection of online resources as they ...

热门标签