views:

43

answers:

1

Is there anyway to change the dropdown button of the datetimepickers color to look like the attached image? If I have to use WPF I will, but I was hoping there would be a way to do it through code.

Thanks

alt text

+2  A: 

Assuming that you are using the DateTimePicker from the WPF Toolkit you will need to create a ControlTemplate setup to look the way you want to. There is an article on how to that: Customizing the New WPF Calendar Controls it talks about the Calendar control but you can apply what it tells you to the DateTimePicker as well.

If you are using the WinForm version of it, I'm not sure how you would be able to do what you want to do.

EDIT: You will most likely want this link too, it's the default style and template for the DatePicker. http://msdn.microsoft.com/en-us/library/cc278067(VS.95).aspx

David
Forget about Winform. The only way you could do it is by creating the control itself. Changing the control template is pretty much what I would do. Theorically, I believe you could change it programmatically (the template that is), but it would be much more complicated than changing it declarativly.
David Brunelle
Okay WPF it is then. Thanks for the links!
broke
If i make something in WPF can i import it into my vb project?
broke