【问题标题】:Get Current Row Number From CollectionView DataTemplate Xamarin.Forms从 CollectionView DataTemplate Xamarin.Forms 获取当前行号
【发布时间】:2021-06-04 15:25:03
【问题描述】:

我有一个 和我想显示每个的当前行号。有可能吗?如果有,怎么做?

【问题讨论】:

    标签: xamarin xamarin.forms


    【解决方案1】:

    最好的方法是在项目中添加一个 Index 属性,然后将项目模板绑定到该项目中,然后从 ViewModel 中填充该索引。模板将被重用,因此在索引 0 处使用的模板稍后可以出现在索引 10 等处。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-02-06
      • 2020-01-20
      • 1970-01-01
      • 2012-09-06
      • 2012-09-15
      • 1970-01-01
      • 2023-01-12
      • 1970-01-01
      相关资源
      最近更新 更多