日期:2014-05-18  浏览次数:21190 次

wpf的ComboBox的附加属性TextBoxBase.TextChanged,如何在后台c#代码中设置?
例如,Button有一个附加属性,ToolTipService.ShowDuration,

前台的xaml代码中,可以这样设置:
<Button Name="MyButton" ToolTipService.ShowDuration="3000"></Button>

在后台代码中,则可以这样设置:
ToolTipService.SetShowDuration(this.MyButton,3000);


ComboBox有一个附加属性,TextBoxBase.TextChanged,

前台代码这样设置:
<ComboBox Name="MyComboBox" TextBoxBase.TextChanged="MyTextChanged"></ComboBox>


那么,在后台代码中,该如何设置?

------解决方案--------------------
恩,你说的是两件事情
一个是Attached Property,一个是Routed Event