johnvisiomvp

Life with Visio and other Microsoft Toys!

XAML Quirk

leave a comment »

Just to be thorough on my testing, I tried setting the theme on one of my WP7 to light. Surprisingly, it turned out that one of the grids was not as wide as I thought and two white bands appeared on either side. Examining the XAML should no reason for the bands. With the dark theme, black next to black does not show.

Luckily Blend is a bit more verbose than Visual Studio and it was easy to track down the grid that was not as wide as it should have been. One of the grids had a width of 471. Checking back in Visual Studio showed no explanantion for the gap. The 471 was not a fixed width because in landscape mode, the width appeared to be around 800.

The temporary fix was to set the width at 480 and then add code to the orientation routine to change the width from 480 to 800 depending on the orientation.

John Marshall… Visio MVP       Visio.MVPs.org

Advertisements

Written by johnvisiomvp

June 22, 2011 at 2:16 pm

Posted in Windows Phone 7, WP7

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: