1

I made a DatePicker like that : https://github.com/eMi-/mvvmcross_datepicker_timepicker/ But I want to have this DatePicker in a dialog for monodroid and bind the selected date (mvvmcross). Someone has an idea how to do this?

The purpose is : when the user tap on the edittext the datepickerdialog is shown and he select the date and then he tap on 'OK' button, the dialogpickerdate disappear and the date appear in the edittext (ddmmyyyy).

4

1 に答える 1

0

v3 では、データバインディングを可能にするいくつかのダイアログ フラグメントのサポートがあります。

ただし、今のところ、やりたいことを実行する最も簡単な方法は次のとおりです。

  • ダイアログを作成するときに、ViewModel.MyDateTimeProperty を使用して日時を設定します。
  • ダイアログ内で日付ピッカーを表示し、変更をリッスンします
  • 必要な場合 - 変更中または OK のいずれかでライブ - 値を ViewModel.MyDateTimeProperty に書き戻します。
于 2013-03-19T12:54:36.960 に答える