NotifyDateSelected() public method

public NotifyDateSelected ( System.DateTime dateSelected ) : void
dateSelected System.DateTime
return void
		protected override void OnModelSet (VisualElement model)
		{
			_view = (CalendarView)model;
			base.OnModelSet (model);

			var calendarView = new CalendarMonthView(DateTime.Now, true);

			calendarView.OnDateSelected += (date) => {
				_view.NotifyDateSelected(date);
			};

			base.SetNativeControl (calendarView);
		}			
Beispiel #2
0
        protected override void OnModelSet(VisualElement model)
        {
            _view = (CalendarView)model;
            base.OnModelSet(model);

            var calendarView = new CalendarMonthView(DateTime.Now, true);

            calendarView.OnDateSelected += (date) => {
                _view.NotifyDateSelected(date);
            };

            base.SetNativeControl(calendarView);
        }
		protected override void OnModelChanged (VisualElement oldModel, VisualElement newModel)
		{
			_view = (CalendarView)newModel;

			base.OnModelChanged (oldModel, newModel);

			LayoutInflater inflatorservice = (LayoutInflater) Context.GetSystemService(Android.Content.Context.LayoutInflaterService);
			var containerView = (LinearLayout)inflatorservice.Inflate (Resource.Layout.calendar_picker, null, false);

			_pickerView = containerView.FindViewById<CalendarPickerView>(Resource.Id.calendar_view);
			_pickerView.Init (new DateTime (2014, 6, 1), new DateTime (2014, 6, 30))
				.InMode (CalendarPickerView.SelectionMode.Single);

			_pickerView.OnDateSelected += (s, e) => {
				_view.NotifyDateSelected(e.SelectedDate);
			};

			SetNativeControl (containerView);
		}