简体   繁体   English

UWP app UI不会从Device Watcher侦听器更新

[英]UWP app UI not updating from Device Watcher listener

How to update UI from bluetooth and BLE Device Watcher Listener Events (add, update, remove) in UWP Application. 如何从UWP应用程序中的蓝牙和BLE Device Watcher侦听器事件(添加,更新,删除)更新UI。

Currently I'm using Observable Collection which updates UI when add or update collection object it's working fine but, when I jump on other page and come back Observable Collection won't able to update ui. 目前,我正在使用Observable Collection,当添加或更新集合对象时它会更新UI,它工作正常,但是,当我跳到另一页并返回时,Observable Collection将无法更新ui。

The chances are, that you replace the original instance of the ObservableCollection with a new one when navigating back to the page, which is a common mistake . 导航到页面时,很有可能用新实例替换了ObservableCollection的原始实例,这是一个常见错误 But it is impossible to say for sure without seeing your code. 但是,如果没有看到您的代码就无法确定地说。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM