“{绑定路径=.}"是什么意思?在 WPF 绑定中意味着什么? [英] What does "{Binding Path=.}" mean in WPF binding?

查看:41
本文介绍了“{绑定路径=.}"是什么意思?在 WPF 绑定中意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

{Binding Path=.} 在 WPF 绑定中是什么意思?

What does {Binding Path=.} mean in a WPF binding?

我看到有人使用它,但找不到任何解释.

I see some people use it, but couldn't find any explanation.

绑定语法中是否还有其他特殊符号(除了{Binding/})?

Are there any other special symbols in binding syntax (other than {Binding /})?

推荐答案

这是绑定到当前源的简写.有关详细信息,请参阅此处.

This is shorthand for binding to the current source. For more info see here.

具体来自文档:

可选地,可以使用句点 (.) 路径绑定到当前来源.例如,Text="{Binding}" 等价于 Text="{Binding Path=.}".

Optionally, a period (.) path can be used to bind to the current source. For example, Text="{Binding}" is equivalent to Text="{Binding Path=.}".

这篇关于“{绑定路径=.}"是什么意思?在 WPF 绑定中意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆