![]() So my initial idea was close enough When I was binding CommandParameter to DataGrid, problem was, that when binding was resolving, DataGrid didn't knew yet what is CurrentColumn or CurrentCell or CurrentItem, so it was resolving to empty values. How to implement a ValueConverterWPF already provides a few value converts, but you will soon need to implement your own converts. That's all you need to do How to use a ValueConverter in XAMLFirst thing you need to do is to map the namespace of your converter to a XAML namespace. Your command Parameter should be just CommandParameter="" that way the parameter will be the row DataContext where the button was clicked which is an instance your model. Problem is, that CommandParameter binding/value conversion is executed when grid is shown, meaning that there is no selected item yet. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |