2013-03-31 42 views
1

儘管我做的Contstructor如下:Silverlight的XNA寬度和高度

SharedGraphicsDeviceManager.Current.PreferredBackBufferHeight = 480; SharedGraphicsDeviceManager.Current.PreferredBackBufferWidth = 800;

Viewport.Width是出來是480和Viewport.Height是走出來是800這是與我想要的相反。

我已經在XAML中設置了風景定位。

任何人都可以看到我要去哪裏錯了嗎?

回答

0

SharedGraphicsDeviceManager類包含一個名爲ApplyChanges()的方法來提交您的更改。
請參閱this文檔。

+0

手機已經成爲風景,但是,Viewport.Width仍然是480 – Subby

+0

如何在[Viewport]上操作如[此處](http://msdn.microsoft.com/zh-cn/library/microsoft .xna.framework.graphics.graphicsdevice.viewport.aspx)? –