private void DateTimeChangedHandler(object sender, ElmSharp.DateChangedEventArgs e) { DateTime dt = e.NewDate; // DateTime can be converted to TimeSpan via .TimeOfDay Control.Time = dt.TimeOfDay; // update Native wrapper and local variable Element.Time = Control.Time; }
/// <summary> /// Sets new date for calendar model. /// </summary> /// <param name="sender">Event sender. Not used.</param> /// <param name="e">Event arguments.</param> void DateChangedHandler(object sender, ElmSharp.DateChangedEventArgs e) { ((IElementController)Element).SetValueFromRenderer(CalendarView.SelectedDateProperty, e.NewDate); }
void DateTimeChangedHandler(object sender, ElmSharp.DateChangedEventArgs e) { _changedCallbackDepth++; Element.DateTime = e.NewDate; _changedCallbackDepth--; }