I am using a surface pro and I want to lock the windows10 rotation or horizontally with CODE.
Please helpme.
like android code:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
Related
I am trying to move my virtual white board application from gdi+ to direct2d.
Perviously I used Graphics::SetCompositingMode(CompositingModeCopy) to "eraser" function, but I can't find similary interface in direct2d.
Thanks.
D2D1_COMPOSITING_MODE_SOURCE_COPY, which requires Direct2D 1.1 (Windows 8+, or Windows 7 SP1 w/ Platform Update)
https://msdn.microsoft.com/en-us/library/windows/desktop/hh446995(v=vs.85).aspx
Also, pairing ID2D1RenderTarget::PushAxisAlignedClip and ID2D1RenderTarget::Clear() can be used to "erase" a rectangular region. Works on Windows 7 RTM.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd742775(v=vs.85).aspx
Is it possible to prevent the reorientation behavior of Windows? (Windows 8 on a Surface Pro in particular.)
I'm already setting a few flags that I thought would help, but no luck:
application settings xml:
<fullScreen>true</fullScreen>
<aspectRatio>landscape</aspectRatio>
<resizable>false</resizable>
<autoOrients>false</autoOrients>
... is there anything else I can do to keep Windows 8 oriented to landscape while my fullscreen air app is in focus?
The windows phone 7 application which I developed using 7.1 SDK occupies the entire screen on wp7. But the same application when opened in Windows Phone 8 shows some extra margin on top because of which my app was not able use the space on top. Any idea how to fix this?
WP7 only supports only one resolution (480x800).
For 480x800 WP8 devices that's obviously fine.
For 1280x768 devices this scales fine as this is the same aspect ratio.
However 1280x720 devices have a different aspect ratio which leaves the black bars at the top of the screen.
The only way to fix this is to upgrade your project to WP8 using the WP8 SDK (whilst watching out for any subtle issues that may bring).
When im testing WP7.1 application on HTC 8x it has some "blank" space in system tray area. I know that its because of new resolutions, but how to fix that?
Just upgrade your project to Windows Phone 8 and recompile it. If you haven't hard-coded sizes in pixels in your layout, it should automatically fill the extra space.
I am trying to get my windows phone development up and running again.
I am having serious issues with the emulator where it looks like this http://imgur.com/qM4uj
Here is my info. Running windows 8 on a computer with quad core proc and good video card.
Any ideas?
Thanks!
This page might help:
http://social.msdn.microsoft.com/Forums/en-US/wptools/thread/5b659eea-9a4f-45ce-8418-b9097d586197/
Emulator Video appears corrupted running XNA or Silverlight + XNA
game. The emulator images included in Windows Phone SDK 7.1.1 have a
compatability problem with some video cards or video card drivers. The
problem appears as corrupted display when using the XNA graphics
rendering engine in landscape orientation when system tray is visible.
To work around this problem: XNA games should either set the
orientation to portrait:
graphicsDeviceManager.SupportedOrientations = DisplayOrientation.Portrait;
-or- enable full screen mode:
graphicsDeviceManager.IsFullScreen = true;
Silverlight + XNA games which use landscape page orientation should
disable the system tray:
<phone:PhoneApplicationPage
SupportedOrientations="Landscape" Orientation="LandscapeLeft"
shell:SystemTray.IsVisible="False"