1 回答

TA贡献1884条经验 获得超4个赞
这是一个可怕的“hacky”解决方案,但我现在所做的是在 SettingsPage 案例中,完成了 Frame.Naviate 以刷新页面。有用。它的恶心。但它有效。这仅在您当前位于 SettingsPage 并保存文件时有效
SettingsPage(PropertyChanged 大小写)
private void GlobalVariables_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
switch (e.PropertyName)
{
case nameof(GlobalVariables.FilePath):
NotifyPropertyChanged(nameof(TextBoxFilePath));
Frame.Navigate(this.GetType());
break;
case nameof(GlobalVariables.FileName):
NotifyPropertyChanged(nameof(TextBoxFileName));
Frame.Navigate(this.GetType());
break;
}
}
- 1 回答
- 0 关注
- 197 浏览
添加回答
举报