gpt4 book ai didi

c# - 如何绑定(bind)到特定的收藏品?

转载 作者:太空狗 更新时间:2023-10-30 00:57:12 25 4
gpt4 key购买 nike

如何将 TextBox.Text 绑定(bind)到 myDictionary["testElement"]

最佳答案

您是否尝试过删除 testElement 周围的引号?如果 key 是一个应该有效的字符串。

From MSDN :

Indexers of a property can be specified within square brackets following the property name where the indexer is applied. For instance, the clause Path=ShoppingCart[0] sets the binding to the index that corresponds to how your property's internal indexing handles the literal string "0". Multiple indexers are also supported.

[...]

Inside indexers you can have multiple indexer parameters separated by commas (,). The type of each parameter can be specified with parentheses. For example, you can have Path="[(sys:Int32)42,(sys:Int32)24]", where sys is mapped to the System namespace.

关于c# - 如何绑定(bind)到特定的收藏品?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5843916/

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