Update observableobject bind to picker on maui #473
Unanswered
candinho1987
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, i'n new to c# and i need some help with updating picker items.
My VM:
`
{
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(DescricaoNovaMedida))]
string descricaoN;
`
I can add a new item, but if i don't close the page e open it again, my picker doesn't get updated.
Picker xaml:
<Picker Grid.Column="0" Grid.Row="5" WidthRequest="200" HeightRequest="32" BackgroundColor ="CadetBlue" HorizontalOptions="Start" Margin="5,0,0,0" ItemsSource="{Binding MedidasView.Medidas}" ItemDisplayBinding="{Binding Descricao}" />
Picker VM.
`
public class MedidasViewModel : ObservableObject
{
ObservableCollection _medidas;
}`
Beta Was this translation helpful? Give feedback.
All reactions