0

So, my view model class contains collection of some class from application's model. How can I show this in stack panel as buttons collection? Is it okey, to create button's collection of my data in the view model?

Tyomios
  • 1
  • 1
  • No it's not. Buttons are part of view and the view model should't care about them. Your view should be responsible for creating them usually through bindings. If you provide some code it will be easier to help you. – Pharaz Fadaei Sep 22 '22 at 10:20
  • Welcome to the forum. You don't need buttons to get a click event (if that's what you're after). With WPF what you see isn't always what's actually there. With dynamic lista of data think about DataGrids. – ChrisBD Sep 22 '22 at 10:25

0 Answers0