我想在轮播中显示一组自适应卡片。如何做到这一点?在我们的应用程序中,我们使用 FormFlow 中的 DescribeAttribute 在轮播视图中显示项目,但现在我们想要切换到自适应卡片,我正在尝试找出如何使其协同工作。
public static IForm<Model> FullForm()
{
return new FormBuilder<Model>();
.Field(new FieldReflector<Model>(nameof(articleId))
.SetType(null)
.SetActive((state) => true)
.SetDefine(createFullChoice)
)
.Confirm("", state => false)
.Build();
}
public static async Task<bool> createFullChoice(Model state, Field<Model> field)
{
field.RemoveValues();
var articles = state.service.getArticles();
var counter = 1;
foreach (var article in articles)
{
article.name = HttpUtility.UrlEncode(article.name);
var description = new DescribeAttribute($"{name}", "http:" + article.imageUrl, counter.ToString(), article.name, article.packing);
field
.AddDescription(article.id, description)
.AddTerms(article.id, article.name, article.id);
counter++;
}
return await Task.FromResult(true);
}