In Xamarin Forms XAML, using HorizontalOptions="Start" or HorizontalOptions="StartAndExpand" for a Picker element may cause the final layout width of the Picker to be insufficient, and therefore truncate longer items upon selection.
Picker element, set its horizontal options to be HorizontalOptions="Start".Red, Blue, Green, Magenta, Aquamarine.0 so that Red is selected by default.Magenta or Aquamarine.The width of the Picker element at runtime should be wide enough to accommodate the longest value in the list ("best fit").
The width of the Picker element at runtime is insufficient, which truncates longer values upon selection.



The native picker controls do not expose to us their maximum potential width unfortunately (when you measure the native controls the result you get is the size of the current selection).
A fix we can and should do is trigger a relayout when the picker control selection is changed.
Thanks for the fast response, @jassmith!
Is also Bug 57539
This bug affects Android and iOS but not UWP.
I use this workaround:
```C#
private void Picker_SelectedIndexChanged(object sender, EventArgs e)
{
ControlsHelper.InvalidateMeasure((Picker)sender);
}
It won't set size based on the longest item, but it will properly display all selected items.
InvalidateMeasure method inside my ControlsHelper.cs class (various Xamarin workarounds):
```C#
/// <summary>
/// Some controls fail to resize. Use this function as a workaround.
/// </summary>
/// <param name="control"></param>
public static void InvalidateMeasure(this VisualElement control)
{
if (control == null)
throw new ArgumentNullException(nameof(control));
var methods = typeof(VisualElement).GetTypeInfo().DeclaredMethods;
var method = methods.FirstOrDefault(x => x.Name == "InvalidateMeasure");
if (method != null)
method.Invoke(control, null);
}
This issue doesn't seem to have had any activity in a long time. We're working on prioritizing issues and resolving them as quickly as we can. To help us get through the list, we would appreciate an update from you to let us know if this is still affecting you on the latest version of Xamarin.Forms, since it's possible that we may have resolved this as part of another related or duplicate issue. If we don't see any new activity on this issue in the next 30 days, we'll evaluate whether this issue should be closed. Thank you!
Most helpful comment
I use this workaround:
```C#
private void Picker_SelectedIndexChanged(object sender, EventArgs e)
{
ControlsHelper.InvalidateMeasure((Picker)sender);
}