发新话题
打印

WPF 绑定标记扩展

WPF 绑定标记扩展

XAML 属性用法
<object property="{Binding}" .../>

或 -
<object property="{Binding
  bindingPropertyName1=value,
  bindingPropertyName2=value,
  bindingPropertyNameN=value}" ...
/>

XAML 对象元素用法

<object>
  <object.property>
    <Binding/>
  </object.property>
</object>


- 或 -

  复制代码
<object>
  <object.property>
    <Binding
      bindingPropertyName1="value"
      bindingPropertyName2="value"
      bindingPropertyNameN="value"
    />
  </object.property>
</object>

下面列出的任何属性 (property) 在示例属性 (attribute) 语法中设置为“属性 (property)=值”对,而按照对象元素语法中的定义,则可以设置为 Binding 元素的属性 (attribute)。
XAML 值
bindingPropertyName#
要设置的 Binding 属性的 Name。并非所有 Binding 属性都可以使用绑定扩展来设置,某些属性只能使用其他嵌套标记扩展进行设置。请参见“可以使用绑定扩展设置的绑定属性”一节。

value
属性的设置值。属性值的处理最终特定于正在设置的 bindingPropertyName 的类型和逻辑。

TOP

发新话题