How to add children of an ItemsControl where the children should decide their own position in Wpf?

Posted by code-zoop on Stack Overflow See other posts from Stack Overflow or by code-zoop
Published on 2010-03-09T09:55:38Z Indexed on 2010/03/09 10:06 UTC
Read the original article Hit count: 363

Filed under:
|
|
|

Hey all

I am using a wpf slider to display the time line in a video player. I need to add an ItemControl of some sort on top of this so that I can add buttons on the time line on certain positions in the time line (the buttons will hold their own position relative to the parent ItemsControl).

What ItemsControl container should I use where I can add child elements that know their own position (based on their timecode)? I have looked at the different ItemsControls in Wpf, and it looks like all of them have a certain way to stack their children (Horizontal or vertical one after another)!

And to add some more complexity, How can the positioning of the children be relative to the width of the parent ItemsControl? This way scaling up and down the ItemsContol will reposition the children!

Thanks

© Stack Overflow or respective owner

Related posts about wpf

Related posts about itemscontrol