In WinRT you can set the lock screen image using:
LockScreen.SetImageFileAsync(file);
Is there a way to also set the start screen image and desktop wallpaper?
No, Windows Store apps do not have access to set the start screen image or desktop wallpaper.
Related
I'm working on a web app frontend on a MacBook with Retina screen, but the app users primarily use windows laptops with 13/14" screens, and my frontend looks too big for them.
How can I accurately emulate windows laptops' screen size and pixel size/density to adjust my UI responsiveness?
I saw some online services where you can enter the link to preview it on different devices, but the app is on my localhost, which doesn't wok there. Is there any other solution?
in google chrome open your app,
Press F12 to open dev tools
Now click on mobile emulator
then you can change the resolution from here and select responsive dimensions.
My application supports both Portrait and Landscape orientations and automatically adapts UI to screen size. However I want to provide an option to lock the screen at current orientation.
If I just stop processing SizeChanged event, it doesn't help, since system still rotates the UI page, so it appears squeezed and truncated.
According to MSDN there is a way to set up supported orientations programmatically in Xna and Silverlight or Windows API (which is disallowed to use by Windows Store App). Is there a way to do that for an Universal app (Windows 8.1 or Windows 10)?
You can control this by setting the DisplayInformation.AutoRotationPreferences.
e.g.
DisplayInformation.AutoRotationPreferences = DisplayOrientations.Landscape;
set it to .None if you want to support both.
I'm creating a Xamarin.Forms app which will work in landscape mode.
I want the WinPhone8 splash screen in Landscape only.
However, the splash image is shown in Portrait at first, and then rotated to landscape when the SupportedOrientations is set.
How do I get the splash screen in landscape?
I think landscape splash screens aren't supported on Windows Phone.
If it's a universal app you could try the method below, but I'm not sure if it only works on Windows Store apps.
Open up your app's manifest file and see if there is something like this in there;
<InitialRotationPreference>
<Rotation Preference="landscape"/>
<Rotation Preference="landscapeFlipped"/>
</InitialRotationPreference>
If not, add it :)
This tells your app to tell the OS that it wants to be in landscape initially.
I have a Windows Phone App for WP 8.1 (Not Windows Phone Silverlight) and I've specified all splash screen sizes in the package manifest. However, for 720p phones (like the Lumia 720) I'm getting letterboxing of the splash screen.
I've also tried adding the Windows Phone Silverlight splash screens from the documented spec, but I get the following error in the build:
MakePRI : warning 0xdef00520: Invalid qualifier: SCREEN-720P
And then I still don't get a full screen splash screen.
Is there any way to prevent this letterboxing?
I believe the only way to solve this is by making the borders of your splash screen of uniform color fill, and set that color as background color in the Package.appxmanifest, so the letterboxing is not seen.
Thing is, Windows Phone 8 and 8.1 devices come in on of four resolutions: 480x800, 720x768, 720x1768 and 1920x1080. From these you can see there are two ratios, 15:9 and 16:9. And the splash screen images you set in the manifest, are all 15:9, just for various screen densities of the 15:9 ratio. So, no way to avoid the letterboxing, as the OS obviously "fits" the splash image into the screen.
In documentation stated that it is enough to keep the only WXGA splashscreen file and it will be scaled by windows Phone OS automatically.
To display a splash screen for all resolutions, use a single image
file named SplashScreenImage.jpg that is 768 × 1280. The phone
automatically scales the image to the correct size.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206974(v=vs.105).aspx#BKMK_Splashscreens
But when I'm using the only file no scaling occurs. I still could see black line on the top of the phone during app start.
Sample here:
https://dl.dropboxusercontent.com/u/19503836/SplashSample.zip
Thanks for any suggestions
You'll notice that it says "scale" and not stretch - which is exactly what's happening. Windows Phone 8 supports 3 resolutions (so far)...
480x800 (15:9)
720x1280 (16:9)
768x1280 (15:9)
You'll notice that the aspect ratio of #1 and #3 are the same, but #2 is different - and that's the problem.
For an image to fit all resolutions it would have to be stretched, which would look very bad so Windows Phone 8 doesn't do that. Instead, it scales the image to fit the screen but a black/white bar appears at the top of screen for #2.
The only way to avoid the black/white bar at the top of the screen is to create 3 separate splash screen and specify them in the WP8 manifest file.
Note: Making your app work and look correct at multiple resolutions is what every app developer should do. All the major platforms (iOS, Android, Windows 8, etc) support multiple screen sizes and/or resolutions so creating multiple icons sizes, splash screen sizes, background images, and other assets is part of the jobs.
I don't think a "splashscreen.jpg" is a good choice in wp8 any longer, even the templates of sdk doesn't have one.
The reason is if the firts page of your app is massive and your have a splashScreen, you may find your screen blink when starting.
So I would add a blank page and set it as the first page. Also you can add your "Splashscreen" Image here.