/// <summary> /// Raises the <see cref="ItemCommand"/> event. This allows you to provide a custom handler for the event. /// </summary> /// <param name="e">A <see cref="CalendarItemEventArgs"/> that contains event data.</param> /// Use the OnItemCommand method to provide a custom handler for the ItemCommand event. /// /// <remarks> /// The OnItemCommand event is raised when an item in the Calendar control is clicked. /// </remarks> protected virtual void OnItemCommand(CalendarItemCommandEventArgs e) { CalendarItemCommandEventHandler onItemCommandHandler = (CalendarItemCommandEventHandler)Events[EventItemCommand]; if (onItemCommandHandler != null) onItemCommandHandler(this, e); }
/// <summary> /// Raises Bubble event /// </summary> /// <param name="source"></param> /// <param name="e"></param> /// <returns></returns> protected override bool OnBubbleEvent(object source, EventArgs e) { if(e is CommandEventArgs) { CalendarItemCommandEventArgs args = new CalendarItemCommandEventArgs(this, source, (CommandEventArgs)e); RaiseBubbleEvent(this, args); return true; } return false; }