Button grids and controls out of boundaries in the screen layout

When editing screen layouts you drag and drop controls in the (soon to be overhauled by Microsoft) editor. If you end up dragging a bit too aggressively you can actually throw the control off the grid and the visible area.

The funny part is that it’s not easily pulled back in since the editor doesn’t allow you to traverse through the active controls.

Here’s a quick description and fix. First I’ve created a simple layout with a single control:

Simple layout.PNG

Then I drag it outside the black area. Notice, that it is no longer visible but not available on the list to the left:

Dragged outside border.PNG

To get it back export the layout to an XML file:

Export layout.PNG

Edit the file in notepad. In this case the file is pretty simple. In real life you’ll be pretty pleased with the search function in Notepad.

The thing to notice here is that the left value has gone negative, since I dragged my control too much to the left:

Negative left.PNG

Change the value to a positive figure and save the document:

Fixed.PNG

Import the layout in the designer

Import layout.PNG

And now the control is visible again:

Button grid is back.PNG

If you end up with controls out of boundaries, you could close the editor without saving to prevent getting in the above situation.

Advertisements

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s