In xaml file:
<Picker
x:Name="picker_cadastronotificacao_tipotelefone"
Title="{x:Static local:AppResources.picker_cadastronotificacao_tipotelefone}"
Style="{StaticResource Picker}"
SelectedItem="{Binding TipoTelefoneSelecionado}">
<Picker.Items>
<x:String>Celular</x:String>
<x:String>Telefone Fixo</x:String>
</Picker.Items>
</Picker>
<Entry
x:Name="entry_cadastronotificacao_telefone"
Placeholder="{x:Static local:AppResources.entry_cadastronotificacao_telefone}"
Style="{StaticResource EntradasTexto}"
Text="{Binding Telefone}"
Keyboard="Telephone"
IsEnabled="{Binding HabilitarCampoTelefone}">
<Entry.Behaviors>
<behavior:MaskBehavior Mascara="{Binding MascaraTelefone}"/>
</Entry.Behaviors>
</Entry>
In view model:
if (TipoTelefoneSelecionado == "Telefone Fixo")
MascaraTelefone = "(XX) XXXX - XXXX";
else if(TipoTelefoneSelecionado == Celular)
MascaraTelefone = "(XX) XXXXX - XXXX";
Error: No property, bindable property, or event found for 'Mascara', or mismatching type between value and property.