-
Mar 20th, 2022, 11:47 AM
#1
Thread Starter
Lively Member
Generate dynamic control in xaml
Hi Guys,
Does anyone have sample on how to generate a dynamic control base on return type from database. I was able to get the data, however i have no idea how to generate the dynamic controls in xaml, this is a survey type application.
I got this kind of Models:
Code:
Public class Question
{
public int Id { get; set; }
public string description { get; set; }
public List<Answer> Answers { get; set; }
}
public class Answer
{
public int Id { get; set; }
public int questionId { get; set; }
public string description { get; set; }
public string controlType { get; set; }
}
The output could be:
Question Description
- RadioButton
- RadioButton
Question Description
- Textbox
Question Description
- Dropdown
I am new on how the structure of xamarin works.
Thank you
Last edited by FunkySloth; Mar 22nd, 2022 at 07:51 AM.
-
May 4th, 2022, 10:24 AM
#2
Lively Member
Re: Generate dynamic control in xaml
Uh...no but it needs to be protected to be thread safe.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|