Alex Wyler
Alex Wyler

Reputation: 65

WPF Extended Toolkit DropDownButton

I'm using Extended WPF Toolkit.

How can I change standard style of arrow in this DropDownButton?

    <wpfx:DropDownButton
        Width="200"
        Height="32"
        Content="DropDownButton: ClickMe">
        <wpfx:DropDownButton.DropDownContent>
            <wpfx:WrapPanel Background="Aqua">
                <StackPanel Width="100" Height="100">
                    <Button>Click Me</Button>
                </StackPanel>
            </wpfx:WrapPanel>
        </wpfx:DropDownButton.DropDownContent>
    </wpfx:DropDownButton>

Upvotes: 2

Views: 2600

Answers (1)

mm8
mm8

Reputation: 169200

You need to modify the (entire) control template. You will find the default one here: https://github.com/xceedsoftware/wpftoolkit/blob/015d89f201800a275feacf8eccedfd58fb1a59ca/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml

You could copy it to your project and set the Template property of your DropDownButton:

<wpfx:DropDownButton Width="200" Height="32" Content="DropDownButton: ClickMe">
    <wpfx:DropDownButton.DropDownContent>
        <wpfx:WrapPanel Background="Aqua">
            <StackPanel Width="100" Height="100">
                <Button>Click Me</Button>
            </StackPanel>
        </wpfx:WrapPanel>
    </wpfx:DropDownButton.DropDownContent>
    <wpfx:DropDownButton.Template>
        <!-- add the ControlTemplate here -->
    </wpfx:DropDownButton.Template>
</wpfx:DropDownButton>

Look for the Path with an x:Name of "Arrow" in the template. You need to set the Data property of this to the Geometry that represents the arrow you want.

There is "Arrow" property or something that you simply can set to some enumeration value or similar. You need to define the look of the arrow yourself and modify the template.

Upvotes: 3

Related Questions