gpt4 book ai didi

c# - 与 ElementName 的绑定(bind)不适用于 Windows XP 上的 DataTemplate

转载 作者:太空宇宙 更新时间:2023-11-03 12:37:11 24 4
gpt4 key购买 nike

为什么与 DataGridTemplateColumnDataTemplate 上的 ElementName 绑定(bind)不起作用(将始终回退到默认值或 FallbackValue) 在 Windows XP 和 .Net 4.0 下?

<DataGridTemplateColumn Header="AAA" Width="62">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBox IsEnabled="{Binding ElementName=ComboBox, Path=IsEnabled}">
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>

但 Windows 7 及更高版本此绑定(bind)按预期工作。

让它在 Windows XP 下工作的唯一方法是使用 x:Reference .

最佳答案

WPF 不支持 Windows XP。

您可以通过以下来源告诉您的老板:Windows Presentation Foundation .它来自 Microsoft,这是官方的。

关于c# - 与 ElementName 的绑定(bind)不适用于 Windows XP 上的 DataTemplate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40486560/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com