Order of strips to display

2 posts, 0 answers
  1. Xander
    Xander avatar
    12 posts
    Member since:
    Jan 2010

    Posted 10 Mar 2011 Link to this post

    Hi,
    I'm probably doing something wrong. But I have not find any help in documentation and in the demos.
    When I prepare commandbar visually in designer, I'm able to move strips to correct order.
    But how to do this in code?
    I merge two commandbars together, so I add the strip to the commandCarRow, but in soe cases this second strip is displayed before the original first. And I have no clue why?
    commandBarChild.Rows[0].Strips.Add(strip);
    Thanks for any idea, as I said I didn't find any help in documentation or demos for that. If there is something about it, jsut point me there, please.
  2. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 15 Mar 2011 Link to this post

    Hello Xander,

    Thank you for your question.

    The strip elements are aligned according to their DesiredLocation property. This property is set when you drag a strip. When you merge the strips, they come with different desired locations.

    In order to achieve the desired behavior, I suggest you to reset their DesiredLocation properties to (0,0). This will result in aligning the strips in the order they were added in the Strips collection.

    I hope this was helpful. If you have any further questions, do not hesitate to contact me.

    Regards,
    Ivan Todorov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top