AppointmentElement
Represents an appointment as a visual element in a Scheduler view, including its formatted text, status, selection, and resize affordances.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class AppointmentElement : SchedulerVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, ISchedulerRecyclableElement
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementSchedulerVisualElementAppointmentElement...
Implements:
Inherited Members
Constructors
Initializes a new instance of the AppointmentElement class.
public AppointmentElement(RadScheduler scheduler, SchedulerView view, IEvent appointment)
The scheduler.
viewSchedulerViewThe view.
appointmentIEventThe appointment.
Fields
The final arrange bounds of the element. This rectangle is calculated durring the layout of the parrent container and is used to perform the final arrange.
public RectangleF DesiredBounds
Identifies the property that controls the fill color of the appointment's resize indicators.
public static RadProperty ResizeIndicatorColorProperty
Identifies the property that controls the size of the appointment's resize indicators.
public static RadProperty ResizeIndicatorSizeProperty
Identifies the property that controls the outline color used for a selected appointment and its resize indicators.
public static RadProperty SelectedBorderColorProperty
Identifies the property that controls whether the appointment is selected.
public static RadProperty SelectedProperty
Properties
Gets or sets the appointment.
public IEvent Appointment { get; set; }
The appointment.
Gets or sets the appointment description.
public string AppointmentDescription { get; set; }
The appointment description.
Gets or sets the appointment icon.
public Image AppointmentIcon { get; set; }
The appointment icon.
Gets or sets the appointment location.
public string AppointmentLocation { get; set; }
The appointment location.
Gets or sets the appointment subject.
public string AppointmentSubject { get; set; }
The appointment subject.
Gets or sets a value indicating whether this AppointmentElement is recurring.
public bool Recurring { get; }
true if recurring; otherwise, false.
Gets or sets the related appointments.
public List<AppointmentElement> RelatedAppointments { get; set; }
The related appointments.
Gets or sets the back color of the resize handles of this element.
public Color ResizeIndicatorColor { get; set; }
Gets or sets the size of the resize handles of this element.
public Size ResizeIndicatorSize { get; set; }
Gets or sets a value indicating whether this AppointmentElement is selected.
public virtual bool Selected { get; set; }
true if selected; otherwise, false.
Gets or sets the border color of this element for the selected state.
public Color SelectedBorderColor { get; set; }
Gets or sets a value indicating whether a appointment description should be drawn
public bool ShowAppointmentDescription { get; set; }
true if ShowAppointmentDescription; otherwise, false.
Gets or sets the start date.
public DateTime Start { get; set; }
The start.
Gets or sets the width of the status area displayed on the left side of the appointment element. This colored vertical bar represents the appointment's status (busy, free, tentative, etc.). The default value is 6 pixels.
public int StatusAreaWidth { get; set; }
Gets or sets the text associated with this item.
public override string Text { get; set; }
Overrides:
Gets or sets the title format.
public string TitleFormat { get; set; }
The title format.
Gets or sets a value indicating whether use the built-in LightVisualElement painting.
public bool UseDefaultPaint { get; set; }
Methods
Creates the formatted title text from the appointment's time, subject, and location using the view's title formatter.
protected virtual string CreateAppointmentText()
The formatted appointment title.
Releases managed resources owned by the appointment element.
protected override void DisposeManagedResources()
Overrides:
Draws the appointment background and its status strip, respecting the Scheduler's status-display setting.
public virtual void DrawDefaultBackground(IGraphics graphics)
The graphics context used to draw the background.
Draws the appointment border and selected-state outline, then returns the supplied scale unchanged.
Draws the appointment's formatted title and, when enabled, its wrapped description.
public virtual void DrawEventText(IGraphics graphics)
The graphics context used to draw the text and appointment icons.
Draws the pair of resize indicators on the appointment edges appropriate to the active view and appointment duration.
public virtual void DrawResizeHandles(IGraphics graphics)
The graphics context used to draw the indicators.
Draws the appointment shadow using the configured shadow style and shape.
public virtual void DrawShadow(IGraphics graphics)
The graphics context used to draw the shadow.
Returns the client area with the space reserved for the appointment shadow removed.
protected override RectangleF GetClientRectangle(SizeF finalSize)
The element size used to calculate the client area.
Returns:The client rectangle available for appointment content.
Overrides:
Copies the appointment's tooltip, selection, location, background, subject, and description into the visual element.
protected virtual void InitializeAppointment()
Initializes the element's default appointment shape, text layout, and visual settings.
protected override void InitializeFields()
Overrides:
Forwards a double-click on the appointment element to the owning Scheduler.
protected override void OnDoubleClick(EventArgs e)
The event data.
Overrides:
Forwards the mouse-down to the owning Scheduler after base element processing.
protected override void OnMouseDown(MouseEventArgs e)
The mouse event data.
Overrides:
Forwards the mouse-move to the owning Scheduler after base element processing.
protected override void OnMouseMove(MouseEventArgs e)
The mouse event data.
Overrides:
Forwards the mouse-up to the owning Scheduler and invalidates the appointment element.
protected override void OnMouseUp(MouseEventArgs e)
The mouse event data.
Overrides:
Updates the displayed appointment subject, description, location, or background when the corresponding event property changes.
protected override void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
The notification identifying the changed property.
Overrides:
Invalidates the element when its selected state changes so the selection styling is repainted.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The property-change details.
Overrides:
Draws the optional appointment icon beside the status area.
public virtual void PaintAppointmentIcon(IGraphics graphics)
The graphics context used to draw the icon.
Uses the base border renderer when UseDefaultPaint is enabled; otherwise draws the appointment-specific border.
Raises the appointment-render callback before default painting and draws resize indicators when resizing is allowed.
Uses the base fill renderer when UseDefaultPaint is enabled; otherwise draws the appointment shadow and background.
Draws the recurrence icon in the lower corner of the appointment when one is available.
public virtual void PaintRecurrenceIcon(IGraphics graphics)
The graphics context used to draw the icon.
Draws the appointment's formatted text through DrawEventText(IGraphics).
protected override void PaintText(IGraphics graphics)
The graphics context used to draw the text.
Overrides:
Accepts drag-over processing only for Scheduler appointment feedback elements.
protected override bool ProcessDragOver(Point mousePosition, ISupportDrag dragObject)
The pointer position in element coordinates.
dragObjectISupportDragThe object being dragged.
Returns:true when the dragged object is a DragFeedbackElement; otherwise, false.
Overrides:
Sets the background id.
public virtual void SetBackgroundId(int backgroundId)
The background id. The value should be existing in the Scheduler.Backgrounds.
Synchronizes element properties with Appointment properties.
public virtual void Synchronize()
Synchronizes the start and end with event.
public virtual void SyncronizeStartAndEndWithEvent()