Is there a way to mimic the CSS float: left; behavior for ListBox elements?
I have a situation where I need to display a dynamic number of buttons on a page and they all need to sit next to each other. Something like this:
---------------------------------------------
| Button 1 | Button 2 | Button 3 | Button 4 |
---------------------------------------------
Again, the number of available buttons will not be known until run-time, so I can’t just set up a grid to do this for me.
Thanks!
If you’re not using the SelectedItem Property in the ListBox, I would suggest using an ItemsControl and overriding the ItemsPanel to a StackPanel with an Orientation=”Horizontal” like CamronBute mentioned.