无论我做什么,WPF绑定错误都不会出现在任何地方

时间:2016-09-23 14:23:51

标签: .net wpf visual-studio visual-studio-2013 data-binding

我以前能够看到输出窗口中运行时或编译时出现绑定错误的时间。现在他们永远不会在那里。我见过像this这样的东西并尝试了所有答案,中间窗口也没有显示任何内容。

这是一个简单的测试。我创建了一个WPF应用程序,只是在主窗口中添加了一个文本框,然后我将Text属性上的绑定设置为不存在的绑定源blah

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <TextBox HorizontalAlignment="Left" Height="23" 
            Margin="151,91,0,0" TextWrapping="Wrap" 
            Text="{Binding blah}" 
            VerticalAlignment="Top" Width="120"/>
    </Grid>
</Window>

我能够正常运行应用程序(我知道这是典型的,因为通常会吞下绑定错误,即它们不会导致异常),但我认为错误应该在输出窗口中。什么都没有。

发生了什么事?

0 个答案:

没有答案
相关问题