Xamarin绑定列表

时间:2018-01-26 16:11:59

标签: xamarin data-binding binding cross-platform

"friendsofsymfony/user-bundle": "~2.0"

这是我的代码片段,我需要在 ListView 绑定此对象的列表。我需要绑定字符串 str lstTest

1 个答案:

答案 0 :(得分:0)

因此,您希望使用library(data.table) test <- data.frame(bucket = c(rep('B1', 5), rep('B2',3),'B3'), failure = c('F1', 'F2', 'F1', NA, NA, 'F3', 'F4', NA,NA), Id = seq(1:9)) fillF <- function(x){ y <- table(x) if(sum(y)<1){y=c('F1'=1)} # always F1 # if(sum(y)<1){y=y+1} # randomly sample from all possibilities x[is.na(x)] <- sample(names(y),sum(is.na(x)),prob =y,replace=T) return(x) } setDT(test)[, failure := fillF(failure), by = bucket] 哪些ItemsSource属性将绑定到您的ListView以及稍后的List<test>内部,以使用另一个ListView来使用ItemsSource你的ListView类型的lstTest属性?

你做不到!您不能在List<string>内使用ListView,但是如果您愿意,可以使用 ListView分组,并且您将拥有一个ListView所有项目,但他们可以在这个例子中(带有奇怪的命名)可以被称为“str”的属性按一些键分组。

有很多很棒的教程和示例,但我建议你看看这个here