I am using Xamarin forms : 2.3.4.247 Prism Library : 6.3.0
The following is the code having Bind-able Picker ass in latest Xamarin Forms: VIEW
Registered the (prism) behaviors in my view as under
xmlns:b="clr-namespace:Prism.Behaviors;assembly=Prism.Forms"
Picker also showing the data of CountryCodes which is a list of type PickerItem
<Picker ItemsSource="{Binding CountryCodes}" Title="Select Country" ItemDisplayBinding="{Binding Name}">
<Picker.Behaviors>
<b:EventToCommandBehavior EventName="SelectedIndexChanged" Command="{Binding ItemTappedCommand}" EventArgsParameterPath="Item" />
</Picker.Behaviors>
</Picker>
in respective view model I've defined the command as under
public DelegateCommand<PickerItem> ItemTappedCommand { get; }
and In constructor:
ItemTappedCommand = new DelegateCommand<PickerItem>(OnCountryPickerTapCommandExecuted);
The delegated function is as under:
private void OnCountryPickerTapCommandExecuted(PickerItem item)
{
SelectedCountryCode = item.Code;//some property I want it to assign
}
The issue is the picker is binding properly, however when selecting/changing selection nothing happen:
Am I missing something, in prism?