Create Entries based on REST Model (MVVM)

I am using Prism to create an app and I want a table view that is populated by entries cells based on the returned value of a REST Response. For example the REST Response looks like:

Variations: {
[
{Name: Colour, Type: Dropdown, Values: [Red, Green, Blue, Purple]},
{Name: Size, Type: Dropdown, Values: [Large, Small, Medium]},
{Name: Cost, Type: double}
]
}

As you can see the type can be different so some would be a custom view cell. The issue is how would I go about taking this as an object in the ViewModel and then binding this to the View to list the Variations as their entries in a TableSection within a TableView?

Answers

  • RicardoJarreeRicardoJarree USMember ✭✭

    Might be worth saying that I don't expect to create the views in the ViewModel, I would use the code behind, just the issue is binding the collection of Variations to the Code Behind so when it is updated the method in the Code Behind can populate the Table Section.

Sign In or Register to comment.