Button with popup submenu - like the one in toolbars
-
What is the easiest way to get a button (acting like a normal Button) with a small arrow symbol or something on the right side and when the arrow is clicked, a submenu (ContextMenu) si displayed. This is fairly common espacially in toolbars and such, see for example "New Project" button in the Visual studio toolbar. I know I can probably get the job done with extensive templating but I want to code as little as possible and loose as little as possible of the default button behavior (mouse over effects implied by windows theme and such). Thanks for sugegstions.
-
What is the easiest way to get a button (acting like a normal Button) with a small arrow symbol or something on the right side and when the arrow is clicked, a submenu (ContextMenu) si displayed. This is fairly common espacially in toolbars and such, see for example "New Project" button in the Visual studio toolbar. I know I can probably get the job done with extensive templating but I want to code as little as possible and loose as little as possible of the default button behavior (mouse over effects implied by windows theme and such). Thanks for sugegstions.
There is no built in split button in WPF, but people have already written it for you: A WPF SplitButton[^] or http://wpfsplitbutton.codeplex.com/[^]
-
There is no built in split button in WPF, but people have already written it for you: A WPF SplitButton[^] or http://wpfsplitbutton.codeplex.com/[^]
Thanks, I tried googling it but never tought of the term "split button".