谁能解释为什么在设置绑定时,有时您会在绑定路径周围加上引号 -
<myObject.myProperty>
<Binding Path="myData" />
<myObject.myProperty/>
有时没有——
<myObject myProperty="{Binding Path=myData}" />
?
微软(http://msdn.microsoft.com/en-us/library/ms752059.aspx#xaml_syntax_in_brief)状态 -
"An attribute syntax names the property that is
being set in attribute syntax, followed by the
assignment operator (=). The value of an attribute
is always specified as a string that is contained
within quotation marks."
但是这里我们总是在不带引号的情况下指定 Binding 元素的 Path 属性。我不了解 {} 语法吗?