NicolajB
NicolajB

Reputation: 285

Styling DateElement in Monotouch.Dialog

I'm using MonoTouch.Dialog on my "settings" section on my app. When I use the DateElement the background is all black, which doesn't really match the rest of the app. Is there a way I can style everything around the "date wheels"?

Upvotes: 3

Views: 462

Answers (1)

poupou
poupou

Reputation: 43553

You can override the CreatePicker method of DateElement, e.g. in your own MyDateElement to create your own customized UIDatePicker.

Another option, for iOS 5.0 (and more recent releases) is to set the Appearance (static property) of UIDatePicker to the style you like (to match your application). That will ensure every UIDatePicker, created from MonoTouch.Dialog or yourself, will have the same look. E.g.

 UIDatePicker.Appearance.BackgroundColor = UIColor.White;

Upvotes: 4

Related Questions