Ivan Golub
Ivan Golub

Reputation: 89

Scale factor Windows Phone

How to make correct design measurements for all resolutions in windows phone? As per Microsoft article base screen size is 800x400 (853x400) but in real life it doesnt looks like true.

I did design in base resolution 853x400

Code

  <Image Width="160" Height="90" Source="{Binding ImageURL}"/>

What I expect to see on different emulators

What I see

From this base resolution is 800x450?

When testing margins - I got more or less same results:

Code

  <Grid Margin="14, 0, 0, 0"/>

But fonts drawing is different -+ Code

  <Style x:Key="TitleStyle" TargetType="TextBlock">
    <Setter Property="FontSize" Value="28" />
    <Setter Property="FontWeight" Value="SemiLight" />
    <Setter Property="VerticalAlignment" Value="Center"></Setter>
</Style>

Results

What I should do? How to work with different resolutions correctly?

Upvotes: 1

Views: 581

Answers (1)

Peter Torr
Peter Torr

Reputation: 12019

As @yasen says, RawPixelPerViewPixel is what you want. The 480px baseline resolution is specific to Silverlight applications, whereas you are building a Universal (XAML) application. More information about this can be found in this recorded presentation from //build. You can skip forward to 48:35 if you just want to know about the change from WP8 to 8.1

Upvotes: 7

Related Questions