portrait/landscape using the designer

  • Thread starter Thread starter leibnizster
  • Start date Start date
L

leibnizster

hello,

can I use the VS2005 designer in such a way that I can visually see
the locations of the controls a for both portrait and landscape
situations? So there will be 2 different layouts (not using docks and
anchors)


Thank you.
 
If you right click on the form (or from the Format menu) you can choose to
rotate the form left/right and see what it will look like at runtime.

If you don't want to use docks and anchors, and unless you've designed for
square screens, you'll have to add your own resizing logic and execute one
or the other depending on orientation. You can detect that in your form
resize event handler and/or use methods to trigger it yourself as described
here:
http://blogs.msdn.com/davidklinems/archive/2006/04/17/577897.aspx

In the latter case, obviously the designer will not execute your code so you
cannot visualise the changes. The only thing you could do is create two
forms and hence have two codebases. Before running the app you could
manually merge the code from the second form into the first at the correct
execution path.

Cheers
Daniel
 
thank you

i hoped that this was implemented somehow in VS2005 as I think would be
something quite useful and pretty easy to implement for the Visual
Studio for Devices team
 
Back
Top