Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DateSelectorViewModel : MvxViewModel<Action<DateTime>>
- {
- private Action<DateTime> setDateValue;
- public DateSelectorViewModel()
- {
- SelectDateCommand = new MvxCommand(SelectDate);
- SelectedDate = DateTime.Today;
- }
- public DateTime SelectedDate { get; set; }
- public ICommand SelectDateCommand { get; }
- public override void Prepare(Action<DateTime> parameter)
- {
- setDateValue = parameter;
- }
- private void SelectDate()
- {
- setDateValue(SelectedDate);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement