Posted 16 years ago
by Matt Swanton

Hi,
When I put a PopupButton inside a WPF Toolbar it does not have the same 'toolbar' style that is normally applied to standard buttons.
I'm aware that this behaviour exists for buttons inside UserControls but you can use the following code to tell the button to use the toolbar style...... but this does not work for the PopupButton, as even though the style is applied the drop down arrow disappears.
Is there anything I can do to make the PopupButton use the toolbar style?
Many thanks in advance
Matt Swanton
When I put a PopupButton inside a WPF Toolbar it does not have the same 'toolbar' style that is normally applied to standard buttons.
I'm aware that this behaviour exists for buttons inside UserControls but you can use the following code to tell the button to use the toolbar style...
Style ButtonStyle = (Style)FindResource(ToolBar.ButtonStyleKey);
myButton.Style = ButtonStyle;
Is there anything I can do to make the PopupButton use the toolbar style?
Many thanks in advance
Matt Swanton