C# – Space-filling ToolBar item in WPF

cwpf

How can I make an item inside a ToolBar fill all the remaining available space? Or, how to right-align some items, since that would give me the same effect in my case.

Note that solutions which involve nesting another container (like a Grid) inside the ToolBar don't work since that disables the special behaviour ToolBar gives to it's items (like no normal borders and look, simple outline border on hover, not receiving focus after click, etc.).

Additionally, anyone knows how to get rid of the little button that would show additional icons that overflowed from the toolbar if I had any?

Best Answer

I ended up using this solution:

http://karlshifflett.wordpress.com/2008/01/23/wpf-sample-series-stretch-toolbar-width-of-window/

It's not ideal, but it works. I still don't know how to get rid of the dropdown on the end though.