Windows Phone强制重新加载页面
本文关键字:加载 新加载 Phone Windows | 更新日期: 2023-09-27 18:20:04
我正在为Windows Phone 8.1开发带有Hub控件的应用程序页面。我需要有动态数量的枢纽部分。我在那里找到了解决方案。它运行得很好。但我对此有意见。
XAML
<Hub x:Name="newsHub" x:Uid="Hub"
helpers:HubBinder.DataSource="{Binding}"
helpers:HubBinder.HeaderTemplate="{StaticResource HubSectionHeaderTemplate}"
helpers:HubBinder.SectionTemplate="{StaticResource HubSectionTemplate}">
</Hub>
当我更改页面的DataContext时,它不会影响newsHub的更新。我需要解决方案来解决绑定或页面重载之类的变通方法中的问题。
请帮忙!
您尝试过强制更新绑定吗?
newsHub.GetBindingExpression(HubBinder.DataSourceProperty).UpdateTarget();