Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF DataGrid: Resource per row?

Is there a way to xamly set a StaticResource per row in a DataGrid accessing it from all the columns?


UPDATE
My aim is to have 3 ComboBox columns, while only the last one is actually bound to the rows item.
For instance, the DataGrid represents a list of Items. I have Category->Vendor->Style->Finish ComboBoxes, but those are only for navigation assistance, in fact, the Item class has only a 'Finish' relationship. So if there coulda been a StaticResource per row, I could set the ItemsSource & IsSynchronizedWithCurrentItem props of the ComboBox and this would work automatically.

Thanks a lot.

like image 660
Shimmy Weitzhandler Avatar asked Apr 28 '26 12:04

Shimmy Weitzhandler


1 Answers

Technically, I guess you could because the row is in the visual tree. But what are you trying to achieve? There's probably a better way.

like image 141
Josh Avatar answered May 02 '26 01:05

Josh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!