Suppose, the followings are two buttons resides in a wpf user control.
<Button x:Name="Option" VerticalAlignment="Center"
Command="{Binding Path=OptionsButtonClickCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}">
<Button x:Name="validity" UseLayoutRounding="true"
Command="{Binding Path=ValidityButtonClickCommand}">
In the click event of Option
button, I am passing the button as CommandParameter in the view model. How can I pass the other(validity
) button in the commandparameter rather than the Option
button for the same event?