Hi
So I have a gridview control and some buttons that should add a new row to the grid. However, each button should add a row with a different setup (some columns should be disabled/invisible).
So, my understanding is that I have to set up a few things in Grid.Resources, that being a control template with a target type and a setup and also a Style with a target type and a setter to set the temlate to the mentioned control template. First off,
does this really have to be like this? Seems to me a bit too complex having to set up two different resources, one linking to another, per variation.
Anyway, I've done this like so (simplified content):
Then, on each buttons Click event I just add
(or whatever "Key" I need) before adding something to the ItemsSource observable collection. However, this doesn't seem to be enough and rows are always created the same. Is there any other way I should do it in order to create rows (and render existing ones) in different layouts?
Thank you