Commands

JesseLibertyJesseLiberty USInsider, University ✭✭✭

I'm sure it is something dumb, but I can't get this to work.

In my button I have

Command="LoginCommand"

In my code behind i set the bindingcontext to the view model. In my view model I have this:

public ICommand LoginCommand { get; set; }

In the ViewModel constructor I have this:

LoginCommand = new Command( GetToken );

And GetToken is a void method. I expect that when I click the button the method GetToken will be called, but it isn't.

Thanks!!

jesse

Best Answers

Answers

Sign In or Register to comment.