Adding a button to a combobox in wpf

Posted by Chris McGrath on Stack Overflow See other posts from Stack Overflow or by Chris McGrath
Published on 2010-05-11T01:15:41Z Indexed on 2010/05/11 1:24 UTC
Read the original article Hit count: 265

Filed under:
|
|

Pretty much I have an Editable Combobox and I want to add a button to the right of the drop down button which clears the selected item. So...

|TextBox |X|v|

I was thinking something like...

<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>

© Stack Overflow or respective owner

Related posts about .NET

Related posts about xaml