How to bind a command to Entry "Unfocused" event in Xamarin Forms

There is an example of an EventToCommandBehavior in the Xamarin.Forms samples (see here). Using this you could bind your control

<Entry>
    <Entry.Behaviors>
        <behaviors:EventToCommandBehavior 
            EventName="Unfocused" 
            Command="{Binding EntryUnfocused}" />
    </Entry.Behaviors>
</Entry>

Then define EntryUnfocused in your class of viewmodel.cs file of your particular view, like below:

public class LoginViewModel : XamarinViewModel
{
    public ICommand EntryUnfocused{ get; protected set; } 
    public LoginViewModel()
    {
        EntryUnfocused= new Command(CompletedCommandExecutedAsync);
    }

    private void CompletedCommandExecutedAsync(object param)
    {
     //yourcode...
    }
}

If you are using the Prism library, you can use their implementation, which is a bit more mature (allowing you to map the event arguments by specifying, which parameter shall be passed), see here.

(Please note that you'll have to add the respective namespace the behavior lives in to your XAML file).