How to fire a "clicked" event after a "command" event on a button click in XAML?

I have a button with two events, i.e. "command" and "click". But at runtime, my "clicked" event is fired followed by a "command" event. I want it in reverse. Is there a way to fire the 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"/>
      

Run codeHide result


+3


source to share


1 answer


Not that I know.

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 publish an event subscribed to my code in your command handler.



Just an option.

0


source







All Articles