boa dia, estou fazendo o binding no botão mas não estou conseguindo realizar a chamada do clique. xaml:
<ContentPage.BindingContext>
<vm:CadastroViewModel>
</vm:CadastroViewModel>
</ContentPage.BindingContext>
<ContentPage.Content>
<ScrollView>
<StackLayout Padding="5">
<Button Text="Cadastrar" BackgroundColor= "#AE0A4A"
CornerRadius="20" TextColor="White" FontFamily="Oswald-Medium.ttf#Oswald-Medium"/>
<Label/>
<Label/>
<estudo:CardView CornerRadius="20" BackgroundColor= "White" BorderColor="White" >
<Entry Placeholder="CPF" Text="{Binding Cpf}" Keyboard="Telephone"
FontFamily="Oswald-Medium.ttf#Oswald-Medium"/>
</estudo:CardView>
<Button Text="Entrar" Command="{Binding CommandEntrar}" BackgroundColor= "#AE0A4A"
CornerRadius="20" TextColor="White" FontFamily="Oswald-Medium.ttf#Oswald-Medium"/>
</StackLayout>
</ScrollView>
</ContentPage.Content>
ViewModel:
public class CadastroViewModel
{
private string cpf;
public string Cpf
{
get { return cpf; }
set { cpf = value; }
}
public ICommand CommandEntrar { get; private set; }
public CadastroViewModel()
{
CommandEntrar = new Command(() =>
{
MessagingCenter.Send<Usuario>(new Usuario(), "SucessoLogin");
});
}
}