关于WPF的属性问题
谁能解释一下 TextBlock.Text 和 Binding Path 的以下含义吗?
<TextBlock>
<TextBlock.Text>
<Binding Path="Something" />
</TextBlock.Text>
</TextBlock>
谢谢。
Could any explain the following meaning of TextBlock.Text and Binding Path?
<TextBlock>
<TextBlock.Text>
<Binding Path="Something" />
</TextBlock.Text>
</TextBlock>
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
TextBlock..Text:属性获取或设置TextBlock的文本内容。这是一个依赖属性。请注意,所有非文本内容都被删除,从而生成 TextBlock 内容的纯文本表示形式。默认值为 String.Empty。
Binding.Path 属性:获取或设置绑定源属性的路径。默认值为 nullNothingnullptra null 引用(在 Visual Basic 中为 Nothing)。
DependencyProperty:代表向 Windows Presentation Foundation (WPF) 属性系统注册的依赖项属性。依赖属性提供对值表达式、属性无效和依赖值强制、默认值、继承、数据绑定、动画、属性更改通知和样式的支持。
TextBlock..Text: Property Gets or sets the text contents of a TextBlock. This is a dependency property. Note that all non-text content is stripped out, resulting in a plain text representation of the TextBlock contents. The default is String.Empty.
Binding.Path Property: Gets or sets the path to the binding source property. The default is nullNothingnullptra null reference (Nothing in Visual Basic).
DependencyProperty: Represents a dependency property that is registered with the Windows Presentation Foundation (WPF) property system. Dependency properties provide support for value expressions, property invalidation and dependent-value coercion, default values, inheritance, data binding, animation, property change notification, and styling.