Alignment Grid Overlay for Windows Phone Projects in Visual Studio 2012

When you create a new Windows Phone Project in Visual Studio 2012 , you can observe that in the end of the MainPage.XAML , there is a comment which states the following

<!–Uncomment to see an alignment grid to help ensure your controls are

aligned on common boundaries. The image has a top margin of -32px to

account for the System Tray. Set this to 0 (or remove the margin altogether)

if the System Tray is hidden.

Before shipping remove this XAML and the image itself.–>

<!–<Image Source=”/Assets/AlignmentGrid.png” VerticalAlignment=”Top” Height=”800″ Width=”480″ Margin=”0,-32,0,0″ Grid.Row=”0″ Grid.RowSpan=”2″ IsHitTestVisible=”False” />–>

Note that there is also an image “AlignmentGrid.png” that exists in the Assets folder of the Windows Phone Project.

Alignment Grid Overlay for Windows Phone Projects in Visual Studio 2012

By uncommenting the code that has the element “Image” from the above code , you will observe that it overlays the grid on top of your Windows Phone Page .

This will help you to verify the alignment of the controls both at runtime and design .

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...