microsoft / WindowsAppSDK-Samples

Feature samples for the Windows App SDK
MIT License
685 stars 217 forks source link

Windows11 widget(adaptive card) cannot update widget page when the widget is exposed #362

Open kxyhjl opened 2 weeks ago

kxyhjl commented 2 weeks ago

Description:

I create a widget and implement a widget provider through https://learn.microsoft.com/en-us/windows/apps/develop/widgets/implement-widget-provider-cs . When I expand the widgets board, my widget is partially exposed and partially not exposed. The widget cannot refresh the page. Even if I slide to make the widget fully exposed, the page still cannot refresh. I found that this happens because deactivate method is called immediately after activate method, and then activate method will not be called again even if you slide it to fully expose. Is it improper to expose the widget but not trigger the activate method? widget Taking the demo “Sample Counting Widget(C#)” in the github as an example, the widget host receives my click event but does not refresh the page(Numbers have not changed).