The simplest of things…

In Xamarin Forms 2.3.4 they added a Bindable picker to the XAML as per this documentation:
https://blog.xamarin.com/new-bindable-picker-control-for-xamarin-forms/

But cut my dick off and call me daisy but I cannot get it to work… I made a list dedicated to it:


public ObservableCollection<string> MuscleGroups { get; private set; } = new ObservableCollection<string>();

Filling it in nice and proper


var muscles = await _workoutStore.GetMusclesAsync();
foreach (var muscle in muscles)
{
MuscleGroups.Add(muscle.Name);
}

Bound it in XAML:


<Picker ItemsSource="{Binding MuscleGroups}" SelectedItem="{Binding SelectedMuscle}" />

But it crashes as soon as I try to load the page, its been two hours after a long day of doing Python in the office, I need a break… Going to fix it tommorow.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s