Command-Binding in WPF Button (ButtonAdv)
The ButtonAdv control supports Commanding. The Command and Command Parameter properties, enables the user to execute any action on clicking the instance.
The Command can be binded as follows:
<sync:ButtonAdv SizeMode="Large" LargeIcon="Employee-WF.png" Command="{Binding CustomCommand}" CommandParameter="{Binding Path=Label, ElementName=Custom}"/>
CustomCommand = new DelegateCommand(Execute, CanExecute);
public ICommand CustomCommand { get; set; }
private bool CanExecute(object arg)
{
return true;
}
private void Execute(object obj)
{
MessageBox.Show(obj.ToString());
}
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page