How can I change the resolution of the phone representing the code when in xaml view in a project?
The phone serves as a drag and drop for the controls, does it have a setting somewhere to set it's resolution. Windows Phone 8 currently have three resolutions; 800x480, 1280x720 and 1280x768.
I'm aware the emulator can be started up with different resolution, but my situation is that my CPU does not support this, im debugging straight on my Lumia 920 (1280x768).
I've got no clue on how the application looks like in 800x480.
But it is a simple application, a preview would be good enough.
You need to open the Device Window: Design -> Device Window
There under the display section you can select the display size (3 available).
Additionally you can test any other resolution by disabling the 'Chrome' option in the device window and setting d:DesignHeight and d:DesignWidth of your page to the desired resolution.
I had the problem and after much time searching google and stackoverflow, I don't think that it is possible to change the resolution of the designer window. However, maybe this link can help you, it helped me back a while ago when I had that problem:
WP8 Emulator screen size
It refers to the emulator, but explains how the app UI will be scaled to match different device resolutions. Hope it helps!
Related
I've developed a WinJs app for the Surface pro 4. The app Runs in fullscreen and is layoutet with the screen resolution of 2736x1824 (surface resolution).
Now when i start the App on the surface the DPI scaling comes into play and messes up my Layout.
Is there a way to disable the scaling for the app?
I've tried:
Windows.UI.ViewManagement.ApplicationViewScaling.trySetDisableLayoutScaling(true);
but that doesn't seem to work.
Actually, making your app layout only for one resolution, especially for such a big resolution is not really great idea since the app can run on device with, for example 1920x1080 resolution where even with DPI scaling disabled your layout will be messed up.
So I recommend making the app layout responsive so it will look right on every resolution.
Not sure if you're still looking at this issue but I've found that the code that you see all over the place is actually XBox only (Link To Docs)
And the Microsoft Devs have been saying for a while that it's a user based setting and they don't plan on allowing you to ds(Forum Link)
You can detect the scaling value though with ResolutionScale (docsLink)
Windows.Graphics.Display.DisplayInformation.getForCurrentView().resolutionScale
Here's a link to a sample that detects it and adjusts.
So what you can do (and what I did) was where needed I used css scale to adjust the system to fit. Most of my app is responsive so it didn't matter, but if you use an iFrame and set it to be 1000px wide with this scale factor it will actually be 1400px or even 1800px wide and totally cut off..
I have listeners setup for the resize events and just adjust as needed.
Hope that helps!
-Dennis
I have application Using WP7.x SDK. I am not using any Window Phone 8 feature.
My App's XAML Pages are fitting perfectly on WVGA and WXGA but on 720P on top of screen there is some blank space. How can i fix this problem (I don't want to create seprate build for Window Phone 8).Please advise.
Unfortunately, this is not possible. The WP7 apps running on WP8 devices are constrained in a 480x800 container.
To take advantage of the 720p screen, you'll have to build a WP8 version of your app.
At least graphically this is possible. You can handle WP7 XNA inputs and graphics right: look my awnswer here: https://stackoverflow.com/a/23457119/766304
Second thing that you have to do is render your Silverlight / XAML UI with XNA. More information about that from here: http://msdn.microsoft.com/en-us/library/hh221583.aspx
All of that is tested and works well but this will manipulate only rendering and not XAML input side, input fixing could be possible or not. Still difrense between those two aspect ratios is so small that result can be good enought.
Am currently working on a new application at work and am needing some help.
Basically I need to take real time screenshots of an application running on the users desktop(not my application) then warp the image using a shade and display the wrapped screenshot at 60 frames a second.
I have a windows form application that does this but I am getting 6 frames a second and when I scale this up to 1600x1600 it drops to 2fps.
So I thought that if I could do this in xna and move as much as possible to the GPU it would speed it up.
So I have googled and googled and cant find any information on how to get a screenshot of a running application in xna other than my xna application.
Thanks for any help.
You can use XNA or additionaly the DWM or GDI+ to get the full desktop. Here are some links which can help you:
Capture screenshot of hidden desktop
Is there a way to take a screenshot of the user's Windows desktop?
C: take screenshot
What is the best way to take screenshots of a Window with C++ in Windows?
Take screen shot in XNA
I think there is no way to get a window screenshot of another application. You can use some pattern detection code to find out where a window is but I do not recommend this.
Is it possible to change Application Icon, Splash screen etc through code, My requirement is i need to change these items after reaching a specific date say (jan-21-2012). Is there any provision present change these contents through code?
No, you cannot change these through code. These components of your application are specified via the manifest file. Regarding the Application Icon, you can have a 'live tile' for your application which is dynamic and can be changed. See MSDN:
How to: Create, Delete, and Update Tiles for Windows Phone
Maybe this blogpost about the dynamic splashscreen can help you?
http://windowsphonegeek.com/articles/All-about-Splash-Screens-in-WP7-ndash-Creating-animated-Splash-Screen
I don't think you can change the application icon this way. Do you have to change the icons multiple times through the year? Or is it one rebranding action? In that case i would suggest submit it with the new icons/splashscreen to the marketplace when you want it to change.
Here there are couple of articles about changing Splash screen:
Creating Animated Splash screen in Windows Phone7
Windows Phone 7 better Splash screen
You can extend techincs from articles above and implement your functionality.
Regarding to "Icon" use well known WP feature - Live Tiles (nice links in answers above).
I have to port a GUI that is currently running on a pc, to a wince device. I have already compiled the code on a win CE platform, the problem is now with the size of the screen of the device which is smaller than some of the dialog boxes of the GUI. I could resize some them in resource view of visual studio 2005. I am unable to proceed further as a lot of screens have bitmaps mapped to them and i cannot just resize the dialog boxes without changing the corresponding bitmaps.
What is the best way to proceed- my last resort would be to disable the bitmaps and redraw them at a later stage.
is there some method of automatically mapping the size of the screen to all the dialog boxes so that they would automatically resize (alongwith the assocaiated buttons etc)
Honestly I think my advise would be to stop and think about the differences between the two contexts before event considering how you would scale the interfaces.
PCs and phones have completely different interaction paradigms and simply scaling from a PC to a phone is very unlikely to work. Even if you could, it's likely to produce an unsatisfactory user experience.
I would expect that the best way to proceed is to sit down and draft up a new UI for the phones. Then bring you back ground code across from the PC and code up the interface part to work with the new UI. If you code is designed according to MVC principles then you are just looking at recoding the controllers and redesigning the views.