Windows Phone UI defaults to 19 margin on the left - windows-phone-8

I've noticed that all guidelines, guides and blogs explain that the standard margin on the left (leading) for Windows Phone is 12.
Yet, when I go "File > New Project in VS2013" for any type of Windows Phone app, I'm met with a margin of 19, which looks really good.
<!-- Title Panel -->
<StackPanel Grid.Row="0" Margin="19,0,0,0">
<TextBlock x:Uid="Header" Text="application name" Style="{ThemeResource TitleTextBlockStyle}" Margin="0,12,0,0" />
<TextBlock Text="{Binding Title}" Style="{ThemeResource HeaderTextBlockStyle}" Margin="0,-6.5,0,26.5" CharacterSpacing="{ThemeResource PivotHeaderItemCharacterSpacing}"/>
</StackPanel>
It looks good, as in the bar at the top with the signal indication, aligns perfectly with 19 in the simulator, yet in designer view it aligns with the number 12 instead.
Why is this? I keep editing my every XAML to match Margin="19,0,0,0" when I thought they should all be Margin="12,0,12,0". Is that right?

It's the difference between Windows Phone Silverlight and Windows Phone Runtime app scaling. Silverlight apps always scale to 480 virtual pixels wide. Runtime apps scale based on pixel density at specific plateaus (multiples of 20% for Windows Phone 8.1 and of 25% for Windows 10).
The 12 pixel guidelines you saw were for probably for Silverlight apps on Windows 8.
That said, the scaling documentation for Windows 10 appears to contradict itself and says 12 pixels for narrow modes in Responsive design 101 for Universal Windows Platform (UWP) apps and 20 pixels in Guidelines for resizing to narrow layouts. I'll file a doc bug to synchronize these.

Related

how to test site in motorola g in chrome emulator?

I am testing my site in all the mobile emulator in chrome.
Here moto g emulator is not available. My testing team is saying issue in the moto g. Can some one help how to test for motorola.
Thanks in advance.
I don't think Mibit has it quite right. While the Moto G may have a screen resolution of 720 x 1280, websites don't display at this resolution.
The CSS spec defines what's called a reference pixel, which allows devices with high density displays to show the same content at a similar size as displays with a lower pixel density. The reference pixel is used for all CSS and website rendering, and determines the viewport size.
The viewport size of the MotoG3, for example, is 360x640. The device pixel ratio is 2, which means every css pixel that the web sees is actually 2 physical screen pixels wide, or represented by 4 physical pixels. This is why the correct emulator settings for chrome to emulate a MotoG3 is:
Screen Size: 360x640px
Device Pixel Ratio: 2
User Agent (Can vary depending on browser): Mozilla/5.0 (Linux; Android 6.0.1; XT1540 Build/MMB29U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.81 Mobile Safari/537.36
To show the difference between using the physical screen resolution and the reference pixel resolution in the emulator, the following screenshots show what google looks like in both of these configurations:
You can clearly see that using 360x640px and a DPR of 2 correctly emulates what should show up on a phone screenn
The only thing the "emulator" does is emulating screen resolution and pixel dimensions.
Customize the screen settings:
Click the values and adjust them. The Moto G has a reolution of 720 x 1280 pixels and set the pixel dimension to 2 or 3.
Custom Device
You can add a custom device if you find an edge-case or niche device. Just do the following:
Go to the DevTools Settings.
Activate the Devices tab.
Click on the "Add custom device" button at the bottom of the panel.
Fill in the form that appears at the top of the list.
Press "Add Device"
Enable Device Mode and find your custom device in
the device menu.
But keep in mind that the "emulator" does have limitations - you cannot test everything regarding:
Device Hardware
Browser UI
Browser Functionality
App Cache
You might want to take a look at something like Mobilizer from http://mobile1st.com so that you're testing pages on real devices, not emulators, as emulators are often showing inaccurate results.
Some of the main issues with emulators:
-A "Keyhole Problem" happens when the site isn't zoomed to fit the phone and still has all of the same content. This makes mobile users feel like they're looking at your site through a keyhole.
-A lot of responsive testing sites use iframes to emulate devices. Unfortunately, many sites have settings that prohibit the browser from rendering them in an iframe, resulting in a blank screen.
-Different browsers and operating systems render default elements, such as buttons and scrollbars differently. While the differences can be minor, they could have a huge effect on your UX.
-It's becoming increasingly popular for websites to have video. However, a lot of phones don't have the player installed (i.e. flash) or have a hard time playing it with the default browser.
-With responsive design taking off a lot of companies have abandoned having a separate mobile site. However, there are some mobile-only sites out there and emulators often give the wrong version.
Hope that's helpful.

Does Windows 8.1 Tablet support large tiles for a website?

I am working on a project in which it is required to add capabilities to a website by which a user can pin the site to the start screen of Windows 8.1.
This can be done by adding some "meta" tags in the head section of the HTML page.
I just have one question whether large tiles are supported on Windows 8.1 Tablet or not.
It is stated here that large tiles are not supported on Windows Phone. Does this mean that large tiles are supported on Windows 8.1 Tablet or not?
Yes you can have live tiles for your website and they will work on windows phone. Scott Hanselman wrote a nice blogpost on how this can be achieved.
Update:
Yes large tiles are supported on Windows 8.1 i.e. a tablet. You can see it when you pin hanselmans or my blog to the start menu.

Which screen sizes consider when designing for Windows Phone 8.1?

I'm writing Windows Phone 8.1 application (I don't care about tablets and desktops in this case) and I'm not sure which screen size psds should I ask from a graphic designer?
I have read design guidlines for Windows Phone 8.1, I get the system of scaling images and their name convention, but I haven't found the advice which screen sizes should I consider in real?
I got a psd from graphic designer in size 720x1280 and there is a background image. Is it enough?
If I get it right, Nokia Lumia 1520 has a screen resolution 1920 x 1080 so I need also that size, right?
How scaled psds do you usually get from a graphic designer for Windows Phone?
Thank you
Windows (Phone) uses a scale factor depending on the pixel density (DPI) of the device. Therefore, there is no default resolution any longer.
Screens with high DPI get a high Scale Factore applied, so all resources are scaled up together with the (all vector based) UI.
Image assets get automatically scaled up, but you can add the scaled items by hand for better results.
So the answer to your question probably is: Yes, it is enough, but you can add additional higher resolution assets for better results.
Also, Phone Store apps allow you to create bundles, containing only the assets for the device you install the app on (if it is installed from the store), so you don't need to care about package/download size.
See:
Quickstart: Using file or image resources
Guidelines for scaling to pixel density
It depends on whether you are building for Silverlight or Windows XAML.
For Silverlight, all phones are considered to be 480 x 800 pixels (for 15:9 devices) or 480 x 854 pixels (for 16:9 devices). The platform will map each of those effective pixels to either 1, 1.5, 1.6, or 2.25 physical pixels depending on the actual resolution of the panel (WVGA, 720p, WXGA, or 1080p). So all UI designs should be built for 480px wide, but you can build higher-resolution assets if needed.
For Windows XAML apps, the story is more complicated. The effective resolution of phones ranges from 384 x 640 up to around 450 x 800 (and possibly higher), based mostly on the physical size of the device. Scale factors range from 1.0 to upwards of 2.4, and each effective pixel is "bigger" in terms of actual physical size compared to Silverlight pixels.
There is more information in my //build talk

WP8 : is a WVGA app auto scaled for WXGA or 720P?

I've developed and submitted a WP 8 app. it's a cocos2Dx game.
I can test it on my device (WVGA) but the simulators (ex: WXGA) don't work on my PC.
I only checked "WVGA" in the WMAppManifest.xml as I can't test the other resolutions
so in the store, it is written : "App requires WVGA (480x800)"
question : is the app available and does it work (with a kind of auto scale) on devices with other resolutions ? (ex: WXGA)
It depends on what you selected in WMAppManifest.xml. At the bottom of the application settings you will find supported resolutions. Tick all three and your app will automatically work on all supported resolutions.
WVGA and WXGA share the same aspect ratio of 15:9, but 720p is slightly taller and uses aspect ration of 16:9.
Read more on Multi-resolution apps for Windows Phone 8.

Can I test app on emulator with 1080p resolution?

I install visual studio 2013, but I can't run app on emulator with 1080p resolution.
Available only this emulators
<ScreenResolutions>
<ScreenResolution Name="ID_RESOLUTION_WVGA" />
<ScreenResolution Name="ID_RESOLUTION_HD720P" />
<ScreenResolution Name="ID_RESOLUTION_WXGA" />
</ScreenResolutions>
How I can test my app for device with 1080p resolution?
Emulator images for 1080p or GDR3 phones are not yet available, but they should be soon!
Anyway from your point of view the 1080p device has same scale factor as 720p devices, so if your app supports 720p devices, it should work just fine on 1080p devices as well.
In case you want to detect such devices or provide specific content, here's a nice article how to do it:
Resolution specific considerations
Or here similar article on MSDN:
Multi-resolution apps for Windows Phone 8
Not yet, the support will be out soon.
But since 1080p is using the same aspect ration as 720p, you can "fake it" and pretend that 720p is actually 1080p and test in that environment. Besides, you won't really notice the difference anyway.
It's available now, you can now run your WindowsPhone8 app in 1080p resolution emulator, Microsoft just released an update for it, read the Windows Phone Developer Blog