0

Is there a way in C#, to dynamically build somehow a stack of items? Just like a list, but without that scrolling and selecting.

I am searching a way to stack items from a list via binding.

And now I want to do this with a stack.

Clue
  • 119
  • 4
  • 15
  • what is wrong with Stack ? I mean you can just make a generic stack of objects. http://msdn.microsoft.com/en-us/library/3278tedw.aspx – xeon111 Sep 16 '12 at 11:34
  • Don't you scroll through a list and eventually select an item of it? – Clue Sep 16 '12 at 11:41
  • If you want a List that doesn't scroll and select, then use a List. It doesn't scroll and select. – Nick Sep 16 '12 at 11:41
  • I think he is referring to a stack-like UI and not stack data structure. is this WPF or Windows form ? – damola Sep 16 '12 at 11:42

1 Answers1

1

Yeah. It's called ItemsControl and it has no ScrollViewing + selecting. YOu can do it like:

<ItemsControl ItemssSource="{Binding items}">
</ItemsControl>

you probably need to change ItemsControl.ItemTemplate and ItemsControl.ItemPanelsTemplate

Erti-Chris Eelmaa
  • 25,338
  • 6
  • 61
  • 78
  • Just like here I guess: `http://stackoverflow.com/questions/3356719/bind-collection-to-stackpanel` – Clue Sep 16 '12 at 12:03