【发布时间】:2010-02-11 22:11:27
【问题描述】:
我创建了一个 ComboBox 子类并添加了我的功能。
现在我想公开 TextBox 的外部属性,例如:
<a:MyComboBox SpellCheck.IsEnabled="True" TextBox.SelectedText="{Binding X}" />
这可能吗,我可能没有选择错误的特定属性,但我想你明白我的意思。
这可能吗?
我必须单独创建所有属性吗?
【问题讨论】:
-
“文本框”是什么意思?您的子类的默认模板在某处使用了 TextBox,而您想绑定该 TextBox 的 SelectedText——对吗?
标签: wpf dependency-properties attached-properties attachedbehaviors dependencyobject