MVVM-Light, firing events from a button inside a data grid column template

后端 未结 3 1553
星月不相逢
星月不相逢 2021-02-06 02:43

MVVM light has been a pleasure to learn, but here I am stuck. The problem is event firing.

In the code below, one button the works and fires events. The other button doe

3条回答
  •  暖寄归人
    2021-02-06 03:09

    The button inside the DataGrid has a DataContext of QuestActions since the Binding is based on the the DataGrid's ItemSource Property. That being the case, you'll need to find the DataContext of the DataGrid itself (or the UserControl or whatever parent that has the Command in it's DataContext) to get to your Command:

    
    

提交回复
热议问题