Learn how to use the FileSystem class from Xamarin.Essentials to locate the app data directory in order to save and load favorites from a JSON file in your application.
- [Facilitator] Now let's take advantage of the fact…that we've got Xamarin Essentials installed.…I'm gonna come back over to my initial shared project…and that product service that we created.…You may remember that we've got some methods in here…to save a WishList, or a favorites.…That's gonna get called from our App.xaml…from those life cycle events.…Let's go ahead while we're in here and just add…some break points before we forget.…We'll come back in to the product service.…Now when we create this product service,…we're gonna want to set the WishList equal to a new…list of product, so that we don't have an empty list.…
That way, we'll be able to add some favorites to it.…But here's where we get into the Xamarin Essentials.…I wanna save out that WishList to a JSON file.…Now, in order to do that, I have to get access to…a directory on the device where I can save the file.…That could vary from Android to iOS and UWP.…This is where Xamarin Essentials comes in.…I wanna be able to get a path, (keys clicking)…and I could say system.IO.path.…
- 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?
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.