0
votes

I am using the TabbedPage as mentioned with more than three tabs for Xamarin.Forms Application.

After entering/selecting values in each tab, Finally i want to save all the values entered in each to Server by using service.

How do i retrieve multiple Tab values in current Child Tab and save the same?

First approach:

  1. We have used the Code behind Work around without MVVM Pattern as below.

FYI: Tabbed Page Implementation Class Details :

public partial class SR : TabbedPage - Parent TabbedPage

public partial class SRListing : ContentPage - Tab1

public partial class SRFilter : ContentPage - Tab2

public partial class SRView : ContentPage - Tab3

For Ex: When we are in Tab3 page, we need to save the Tab1 ,Tab2 Page Values as well.

  1. As mentioned in above link, we have created three tabs using MVVM pattern.

Kindly suggest and provide links on how to retrieve values of Tab using MVVM Pattern as well as code behind logic.

I am awaiting for your response.

Thanks in Advance.

1

1 Answers

1
votes

MVVM is an architectural pattern so it doesn't actually have to anything retrieving values.

To store values to SQLite locally you can use: http://code.tutsplus.com/tutorials/an-introduction-to-xamarinforms-and-sqlite--cms-23020

Or if you just want to store a few pieces of data you can use https://www.nuget.org/packages/Xam.Plugins.Settings/

But if you want to learn more about MVVM: You can see a basic setup here: http://arteksoftware.com/end-to-end-mvvm-with-xamarin/

I have created an example github project showing MVVM with MVVMLight but this is meant for larger apps: https://github.com/adamped/xarch-starter