我正在为我的 UWP 应用程序使用 Template10,并且我想动态更新页眉文本。这是我的 XAML,
<controls:PageHeader x:Name="pageHeader" Text="{Binding ViewModel.Title}">
<!--place stretched, across top-->
<RelativePanel.AlignTopWithPanel>True</RelativePanel.AlignTopWithPanel>
<RelativePanel.AlignRightWithPanel>True</RelativePanel.AlignRightWithPanel>
<RelativePanel.AlignLeftWithPanel>True</RelativePanel.AlignLeftWithPanel>
</controls:PageHeader>
这是异常消息,
WinRT information: Failed to assign to property 'Template10.Controls.PageHeader.Text'. [Line: 57 Position: 73]
Additional information: The text associated with this error code could not be found.
Failed to assign to property 'Template10.Controls.PageHeader.Text'. [Line: 57 Position: 73]
没有绑定它可以完美地工作,但我需要动态改变它,有什么想法/解决方法吗?谢谢。