Learn how to use two-way data binding on order entry fields to enable user inputs to update the model for the page. See how to use the Entry and Stepper controls and bind both to the same data.
- [Instructor] We've seen data binding…some simple display properties…but now that we're on this forum and we have an entry…and a stepper, we've got some other things to consider.…Now for this form we'll be using this…order class as our model,…it has a quantity that's an int…and a product name that's a string that we'll be using.…So we come back to our XAML file…here in the text for product name…you can actually just change that, we're gonna use Binding,…actually product name is the name of our property…so that makes that easy.…And then as we come down here to the entry…we can do something similar,…do a binding path equal quantity…we also wanna set the mode here to TwoWay,…if you look at the different options…you can see there's a OneTime,…meaning we'll get the value once…but then if it changes we won't be notified,…a OneWay which means we'll get the value from the model…to the user interface element or control,…and what we want is the TwoWay 'cause we want…any changes represented here in the entry…to go back to the model or the class instance.…
- Creating a Xamarin.Forms solution
- Navigating between pages
- Screen layouts and controls in Xamarin.Forms
- Data binding
- Adding style to a control
- Using a Xamarin.Essentials package
- Embedding native controls in your shared forms
- Writing custom renderers
Skill Level Beginner
Xamarin Development: Authentication and Identitywith Matt Milner1h 32m Intermediate
What you should know1m 21s
2. Layout and Controls
3. Native Platform Integration
4. Native Controls and Renderers
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.