Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Phone 7 resolution - Is my emulator lying to me?

All the talk on WP7 resolution = 800x480. I can create more than 480 and it shows up in the emulator - I just don't know if this means I do have more screen space than is promulgated or if my emulator is lying to me.

Putting a Silverlight app in Landscape only mode (SupportedOrientations="Landscape" Orientation="Landscape" in <phone:PhoneApplicationPage />). I'll have a width of 800 and height of 480 (d:DesignWidth="800" d:DesignHeight="480").

I change d:DesignHeight to d:DesignHeight="496" and then add as the only XAML inside the <phone:PhoneApplicationPage /> tag:

<Grid x:Name="LayoutRoot" Background="Blue">
    <TextBlock Text="bottom" VerticalAlignment="Bottom"></TextBlock>
</Grid>

See there? My "Bottom" text is still showing on the screen. Anything thoughts?

like image 275
Todd Main Avatar asked Sep 27 '10 20:09

Todd Main


2 Answers

Your "design" sizes will be overridden at runtime. Your emulator isn't lying but your designer is (now) misleading.

You can data-bind some labels to ActualWidth and Actualheight to verify what's happening.

like image 125
Henk Holterman Avatar answered Oct 21 '22 01:10

Henk Holterman


Assuming that you have mc:Ignorable="d" set as an attribute on the page, d:DesignHeight="496" only applies in the designer, it does not affect what happens on the emulator or device.

like image 45
Matt Lacey Avatar answered Oct 21 '22 03:10

Matt Lacey