<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="This is my text">
<TextBlock>
<Run Text="{Binding}"/>
</TextBlock>
</Window>
抛出InvalidOperationException
:“双向绑定需要 Path 或 XPath。”
指定Mode=OneWay
, 会导致一个奇怪的编译器错误:
The tag 'Binding,' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'.
有什么方法可以解决这个问题吗?