【问题标题】:windows phone 8 longlist selector .how to find the new item is added in the longlist selector.currently i am using ItemRealized eventwindows phone 8 长列表选择器。如何在长列表选择器中添加新项目。目前我正在使用 ItemRealized 事件
【发布时间】:2015-07-30 07:02:40
【问题描述】:

我目前正在使用 ItemRealized 事件来获取日志列表选择器中新添加的项目,但问题是,它在页面加载期间触发。在页面加载期间我向列表添加了 20 多个项目,那时我不想触发 itemrealized事件。 任何其他等于 ItemRealized 的方式。或者如何实现这个问题。

【问题讨论】:

    标签: windows-phone-7 windows-phone-8 windows-phone


    【解决方案1】:

    如果您使用 MVVM 模式意味着您可以将您的 LongListSelector.ItemSource 绑定到您的 ViewModel ObservableColection<T>.ObservableColection 意味着 INotifyColectionChanged 所以您将获得 ColectionChangedEvent

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多