user2085748
user2085748

Reputation: 107

suggestions how to achieve DatePickerDialog equivalent using mvvmcross & monotouch

Currently have a Droid app implemented that in response to a button press pops up a DatePickerDialog.
As this must be a common use case does anyone have any suggestions how to achieve something similar with Touch?

Not sure if an AlertView can be used & if so how or what would be a suitable approach...

A pointer to an existing sample or project that does something similar would be appreciated.

TIA

Andreas

Upvotes: 1

Views: 450

Answers (1)

Stuart
Stuart

Reputation: 66882

Assuming my UI designers agree (sometimes they like to do things differently)... I'd use a UIDatePicker - see


As a fairly experience MonoTouch and MvvmCross dev I would do this by:


If I were in more of a hurry though, I might instead:

  • dump a button on the screen and bind it's Title to the ViewModel DateTime
  • use code-behind in my 'page' UIViewController to hook up the button TouchUpInside to some code to show a UIDatePicker
  • use code-behind to respond to UIDatePicker events in order to set properties back in the ViewModel

Upvotes: 1

Related Questions