Ask a questionAsk a question
 

AnswerElement layout arrangement?

  • Tuesday, November 03, 2009 11:50 PMsaxisa Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Say I have a grid or container with width 100, and I have 20 elements with width 10.  Each element gets 1 row to itself, but needs to overlap with the elements above and below it.  So element one position x = 0, element 2, x = 5, etc. etc.  But the key here is that the width of 100 can change, and all the elements need to scale horizontally so the first one always starts at 0, and the last one always starts at width-10.

    So basically, if the user reduces the width of the window to 10, all the elements are perfectly lined up vertically, and as the width of the container increases the 20 elements all move horizontally by different amounts so they are still going in a straight diagonal.

    Hope this makes some kind of sense... if so is there a simple way to do this?   Each one of my elements is a view with a viewmodel providing the data displayed in the element as well.

Answers

All Replies