Hi Juan Ignacio Rodríguez,
Greetings from Syncfusion.
We have validated your query and prepared a workaround sample based on your requirement to differentiate SelectedItemTextColor & UnSelectedItemTextColor when using with Custom view (Item Template). Please find the code snippet and sample
Code Snippet [XAML]:
<picker:SfPicker x:Name="picker"
ItemsSource="{Binding Colors}"
HeaderText="Select a Color"
UnSelectedItemTextColor="Gray"
SelectedItemTextColor="Red"
SelectionChanged="Picker_SelectionChanged" >
<picker:SfPicker.ItemTemplate>
<DataTemplate>
<StackLayout>
<Label Text="{Binding Name}" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" TextColor="{Binding ColorValue}"/>
</StackLayout>
</DataTemplate>
</picker:SfPicker.ItemTemplate>
</picker:SfPicker> |
Code Snippet [C#]:
private void Picker_SelectionChanged(object sender, Syncfusion.SfPicker.XForms.SelectionChangedEventArgs e)
{
var picker = (sender as SfPicker);
if (e.NewValue != null)
{
(e.NewValue as PickerColor).ColorValue = picker.SelectedItemTextColor;
}
if (e.OldValue != null)
{
(e.OldValue as PickerColor).ColorValue = picker.UnSelectedItemTextColor;
}
} |
Please let us know, if you have any other concern.
Regards,
Hemalatha M.