在写代码过程中发现直接一下方法中时无法直接进行数据绑定的:
<TabControl x:Name="ScanPaperSet" Foreground="Black" BorderBrush="LightBlue" BorderThickness="0">
<TabItem x:Name="item1" Header = “{Binding ...}”>
</TabItem>
</TabControl>
换种方式就可以了:
<TabControl x:Name="ScanPaperSet" Foreground="Black" BorderBrush="LightBlue" BorderThickness="0">
<TabItem x:Name="item1">
<TabItem.Header>
<TextBlock x:Name="itemHeader1" Text = “{Binding ...}”
</TabItem.Header>
</TabItem>
</TabControl>
可能是TabItem没有继承DependencyObject的原因吧。现在问题解决了!!!