Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

How to use multiple Commands for one ViewModel

public ICommand Command1 { get { return new RelayCommand(e => true, this.MethodForCommand1); } }
public ICommand Command2{ get { return new RelayCommand(e => true, this.MethodForCommand2); } }
private void MethodForCommand1(object obj){ //Type your code for Command1 }
private void MethodForCommand2(object obj){ //Type your code for Command2 }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #multiple #Commands #ViewModel
ADD COMMENT
Topic
Name
1+3 =