-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
I would like to have a Button with a Command property with a CommandParameter in the DataGrid.
Everything in the application is following MVVM pattern with dependency injection.
When I click the button it does nothing. When I switch to the Binding instead of the x:Bind the button does nothing.
Is there a way to reference Ancestor DataContext to the Command and bind a current Item into CommandParameter?
<DataTemplate x:DataType="vm:SearchUserViewModel"> <StackPanel> <Button Command="{x:Bind EditUserCommand}"> <SymbolIcon Symbol="Edit"/> </Button> </StackPanel> </DataTemplate>
The DataGrid is bound to the ObservableCollection and the DataTemplate does not support either binding patterns.
To me this is a bug and needs to be fixed.