3

I am having a button with two events, i.e. 'command' and 'clicked'. But while executing, my 'clicked' event gets fired up followed by 'command' event. I want it in a reverse order. Is there a way to fire up 'command' event first? Any help would be appreciated.

<Button BackgroundColor="Transparent" Text="Sign In" TextColor="{x:Static common:ColorResources.ButtonTextColor}" AbsoluteLayout.LayoutBounds="0, 0, 1, 1" AbsoluteLayout.LayoutFlags="All" Command="{Binding SignInCommand}" Clicked="OnSigninClicked"/>
Ali_Waris
  • 1,944
  • 2
  • 28
  • 46

1 Answers1

0

Not that I know of.

But what you could do, if you want the command to trigger something that is handled in the code behind, is to remove the 'clicked' event handler and in your command handler publish an event that is subscribed to my your code behind.

Just an option.

Mashton
  • 6,037
  • 2
  • 25
  • 35
  • I did it using property. I created a public static properly in ViewModel and used its value as a flag in my code behind. That trick worked. Anyway, thanks for helping. – Ali_Waris Nov 17 '14 at 04:50