Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Messaging Center Subscribe for current object

wajwaj USMember ✭✭

I have a scenario where i create Entry Controls programmatically.
case "dropdown":

                                      Entry objDropdown = new Entry();
                    objDropdown.HeightRequest = 40;
                    objDropdown.StyleId = Convert.ToString(control.ElementId);

                    MessagingCenter.Subscribe<Picklists, string>(objDropdown, "PicklistSelected", (sender, arg) =>
                        objDropdown.Text = arg; // 
                    } );

If i click on any entry it will open me a list view. Once i select the option will populate in the Entry.
But this should show the selected value only in the current entry but it is changing the value in all the entry's.

How to avoid this situation. I want the selected value to be populated only in the current entry.

Sign In or Register to comment.