Update label from one Page to another in Xamarin Forms

wilmermmj

New member
Joined
Aug 29, 2023
Messages
1
Programming Experience
1-3
Hello, I hope you are well... I am starting in Xamarin... I have something to know... I have two pages on page 1 I have a label, from this page I go to another to look for a name on page 2, I want to update the Text when I choose this name of that Label of that page1… Thank you
 
You are doing things the wrong way if you are using the UI as your data model. If both pages shared the same data model, then updating the model in one place should update the other UI automatically assuming you are using databinding for those bits of UI. If you are writing code in Xamarin Forms as if it was old fashioned WinForms without data binding, then you'll definitely have to do things the hard way of notifying the other form to update itself.
 
Back
Top Bottom