Thursday, September 11, 2008

WPF drop down and split button

I've been trying to create a drop down button and a split button in WPF.
It has been very frustrating, but I think I finally got it.

Drop Down and Split Button ver 1.2

I have updated the split button control to use command binding.

Please let me know if this helps you.


Anonymous said...

I have tried it out, and it seems to work alright. Looks great!
However, I tried to have the DropDownButton show a new image by having the program set its ImageSource property to a new image source, and was surprised to find that the image did not change. - How come?

Huy Pham said...

I have updated the sample, to show how you can load the menu item in code.

Anonymous said...

Hi, great sample! I have one question: how do you insert a separator menu item in the context menu? Thanks,


myCollections said...


Thanks for sharing this code.
Is It ok if i use it my application ?



Huy Pham said...

Yes, you can use it.

mahara said...

Thank you. I've been looking for things like this and it just works fine.

One question: does it work with WPF/Windows themes, e.g.: switching between Aero and Classic themes?

Anonymous said...

I tried to have the dropdown to bind a xml and have a submenu as well. it didnt work for me. any insight how this can be done ?

Anonymous said...

Fantastic control, great job

Cindy Dy said...

amazing and nice looking site please love it and make more effective… keep it up.