Is there a WPF equivalent for ToolStripButton?

11.3k views Asked by At

I'm learning WPF and have been trying to create a toolstrip. Is there a direct equivalent of the WinForms ToolStripButton or is the correct way of use just to add a normal button and format it?

I've found that Microsoft have a page that lists WinForm controls and their WPF equivalents here but that doesn't mention the toolstripbutton.

1

There are 1 answers

3
Ray On BEST ANSWER

You can just put buttons inside a ToolBar and it will change the style of the buttons to make them look like a toolbar.

<ToolBar>
    <Button>Save</Button>
    <Button>Open</Button>
</ToolBar>

Looks like this:

enter image description here

If you want images in the buttons, you have to do the normal thing of modifying the content of the button.

<Button>
    <Image Source="..." />
</Button>