wpf – 如何调试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 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

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...