Windows phone 8.1 具有动态数据的Listview

Windows phone 8.1 具有动态数据的Listview,windows-phone-8.1,winrt-xaml,Windows Phone 8.1,Winrt Xaml,我得到了一个应该填充listview的模型。根据类型,我需要显示可能的答案列表 { "Question" (string): ("Please choose the one of the followings best suitable to your situation.") Type (enum) (Type.Radio, Type.FreeText, Type.Number, Type.Checkbox) List<Answers> ({"It was

我得到了一个应该填充listview的模型。根据类型,我需要显示可能的答案列表

{
    "Question" (string): ("Please choose the one of the followings best suitable to your situation.")
    Type (enum) (Type.Radio, Type.FreeText, Type.Number, Type.Checkbox)
    List<Answers> ({"It was cold inside.", 
        "It was cold but the heaters turned on after asking." 
        "It was warm" })
    RequiresComments (bool) (true)
}
{
“问题”(字符串):(“请选择以下最适合您的情况之一。”)
类型(枚举)(Type.Radio、Type.FreeText、Type.Number、Type.Checkbox)
列表({“里面很冷。”,
“天气很冷,但询问后加热器打开了。”
“天气很暖和”})
要求书(bool)(真实)
}
问题的数量将来自服务器。这可能是70个问题,其中一些作为收音机,一些作为复选框,一些只是自由文本


我在Android和iOS上做了这个,但我不知道如何在WindowsPhone8.1上做。谁能给我举个例子或给我指出正确的方向

在您的视图中,有一个带有enum中的值的单选按钮。用户选择类型后,从服务器获取答案

获取答案列表后。将listview(在视图中)的Itemssource设置为您获得的答案列表


在评论部分,您可以使用bool并使用转换器更改评论文本框(在您的视图中)的可见性。

检查可能性后,我的想法如下:QuestionListView的数据模板将包含AnswerListView。AnswerListView的模板类型将绑定到类型enum。因此,当我给出答案列表时,它将使用正确的模板来填充它。