This is a migrated thread and some comments may be shown as answers.

Order of strips to display

1 Answer 64 Views
CommandBar
This is a migrated thread and some comments may be shown as answers.
Xander
Top achievements
Rank 1
Xander asked on 10 Mar 2011, 10:44 AM
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.

1 Answer, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 15 Mar 2011, 03:16 PM
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!
Tags
CommandBar
Asked by
Xander
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Share this question
or