1
几乎我有一个可编辑组合框,并且我想在清除所选项目的下拉按钮的右侧添加一个按钮。所以...将按钮添加到wpf中的组合框中
| TextBox | X | v |
我想是这样......
<Style...>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<ControlTemplate.Resources>
<Style TargetType="{x:Type TextBox}">...Add button here...</Style>
</ControlTemplate.Resources>
<ContentPresenter />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
很好的答案。对于这种体验的重新模板化是非常标准的和实现它的方式......并通过带有代码隐藏事件绑定,命令或新子类的模板中的额外视觉效果,它们都可以帮助您。 – 2010-05-11 08:29:04