On one Page, need to display either the standard or numeric keyboard, depending on a property of our PageModel.
We were hoping that the following would work.
XAML:
<Entry x:Name="AnswerEntry" Grid.Row="2" Style="{StaticResource entryStyle}" HorizontalTextAlignment="Start" Keyboard="{Binding KeyboardType}" Text="{Binding AnswerValue}" />
PageModel:
switch (this.PageParams.Question.ChaType)
{
// N = Integer numeric
case "N":
// V = Decimal numeric
case "V":
this.KeyboardType = Keyboard.Numeric;
break;
default:
this.KeyboardType = Keyboard.Text;
break;
}
However, I'm only getting a default keyboard.
I'm implementing INotifyPropertyChanged etc. - other properties/controls are working.
Do I have to bind differently for Keyboard? Is it bindable?