加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

wpf – 如何调试Windows运行时数据绑定?

发布时间:2020-12-13 20:20:28 所属栏目:Windows 来源:网络整理
导读:在Windows Metro风格应用程序中有什么技术来调试数据绑定的问题?是否有可用的技术,如WPF和Silverlight应用程序,描述如下: How can I debug WPF bindings? Debugging Data Bindings in a WPF or Silverlight Application How can I turn binding errors int
在Windows Metro风格应用程序中有什么技术来调试数据绑定的问题?是否有可用的技术,如WPF和Silverlight应用程序,描述如下:

> How can I debug WPF bindings?
> Debugging Data Bindings in a WPF or Silverlight Application
> How can I turn binding errors into runtime exceptions?

编辑:我最初询问有关WinRT数据绑定调试技术,以便我可以解决Metro: Why is binding from XAML to a property defined in code-behind not working?所描述的问题.我最终发现a solution到这个问题,但试验工作的解决方案,我没有看到任何消息在Visual Studio 11输出窗口当我故意拼错属性名称,以便找不到.此外,ExpressTraceSources也不会出现在WinRT应用程序中.

另一个可能的解决方案
sealed partial class App : Application
{
    public App()
    {
        this.InitializeComponent();
        this.Suspending += OnSuspending;
        DebugSettings.BindingFailed += OnDebugSettingsOnBindingFailed;
    }

    private void OnDebugSettingsOnBindingFailed(object sender,BindingFailedEventArgs args)
    {
        new MessageDialog(args.Message).ShowAsync();
    }
    ...
}

原始来源:http://www.tozon.info/blog/post/2012/07/23/Debugging-WinRTXAML-bindings.aspx

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读