New to Telerik UI for WinForms? Start a free 30-day trial

Represents a base class for different print styles of RadScheduler.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

C#
public abstract class SchedulerPrintStyle : ICloneable

Inheritance: objectSchedulerPrintStyle

Derived Classes: SchedulerBaseWeeklyPrintStyleSchedulerDailyPrintStyleSchedulerDetailsPrintStyleSchedulerMonthlyPrintStyle

Implements: ICloneable

Constructors

Creates a new instance of the class.

C#
public SchedulerPrintStyle()

Creates a new instance of the class.

C#
public SchedulerPrintStyle(DateTime startRange, DateTime endRange)
Parameters:startRangeDateTime

The start date of the printing range.

endRangeDateTime

The end date of the printing range.

Properties

Gets or sets the font of the appointments.

C#
[Browsable(true)]
public Font AppointmentFont { get; set; }

Gets or sets the end date of the date range which describes which appointments should be printed.

C#
[Browsable(true)]
public virtual DateTime DateEndRange { get; set; }

Gets or sets the font of the date headers.

C#
[Browsable(true)]
public Font DateHeadingFont { get; set; }

Gets or sets the start date of the date range which describes which appointments should be printed.

C#
[Browsable(true)]
public virtual DateTime DateStartRange { get; set; }

Gets or sets whether a page title should be printed.

C#
[Browsable(true)]
public bool DrawPageTitle { get; set; }

Gets or sets whether a calendar should be printed inside the title area.

C#
[Browsable(true)]
public bool DrawPageTitleCalendar { get; set; }

Gets or sets the groping mode of the printed document.

C#
[Browsable(true)]
public SchedulerPrintGroupType GroupType { get; set; }

Gets or sets the height of the heading area.

C#
[Browsable(false)]
public int HeadingAreaHeight { get; set; }

Gets whether printing is grouped and the source Scheduler currently has at least one resource.

C#
protected bool IsGrouped { get; }

Gets or sets the width of the notes area.

C#
[Browsable(true)]
public int NotesAreaWidth { get; set; }

Gets or sets the font of the page heading.

C#
[Browsable(true)]
public Font PageHeadingFont { get; set; }

Gets the RadScheduler that is being printed.

C#
[Browsable(false)]
public RadScheduler Scheduler { get; }

Gets or sets whether a lined area for handwritten notes should be printed.

C#
[Browsable(true)]
public bool ShowLinedNotesArea { get; set; }

Gets or sets whether an area for handwritten notes should be printed.

C#
[Browsable(true)]
public bool ShowNotesArea { get; set; }

Gets or sets a value indicating whether the current timezone should be printed inside page title area.

C#
[Browsable(true)]
public bool ShowTimezone { get; set; }

Gets or sets the end time of the time interval which describes which appointments should be printer for every single date.

C#
[Browsable(true)]
public virtual TimeSpan TimeEndRange { get; set; }

Gets or sets the start time of the time interval which describes which appointments should be printer for every single date.

C#
[Browsable(true)]
public virtual TimeSpan TimeStartRange { get; set; }

Gets the inclusive number of calendar days between the configured print range endpoints.

C#
protected int TotalDays { get; }

Methods

Creates a new instance of the same print-style type and delegates setting transfer to CopyProperties(SchedulerPrintStyle).

C#
public object Clone()
Returns:

object

A new print style populated by its CopyProperties(SchedulerPrintStyle) implementation.

Implements: ICloneable.Clone()

Orders appointments by start time, then by longer duration first for ties, and finally by summary.

C#
protected int CompareAppointments(IEvent x, IEvent y)
Parameters:xIEvent

The first appointment to compare.

yIEvent

The second appointment to compare.

Returns:

int

A value indicating the relative order of the appointments.

Orders appointments by Scheduler resource order, then by the same time, duration, and summary rules as CompareAppointments(IEvent, IEvent).

C#
protected int CompareAppointmentsByResource(IEvent x, IEvent y)
Parameters:xIEvent

The first appointment to compare.

yIEvent

The second appointment to compare.

Returns:

int

A value indicating the relative order of the appointments.

Copies the base print range, time range, fonts, title, and notes settings to another style. Derived styles can override this method to copy their additional settings.

C#
public virtual void CopyProperties(SchedulerPrintStyle destination)
Parameters:destinationSchedulerPrintStyle

The print style that receives the settings.

Rounds a time up to the active day view's cell interval, or to an hour boundary for other view types.

C#
protected virtual DateTime DateCeiling(DateTime dateTime)
Parameters:dateTimeDateTime

The time to round.

Returns:

DateTime

The time rounded up to the active view's cell interval or the hour boundary.

Rounds a time down to the active day view's cell interval, or to an hour boundary for other view types.

C#
protected virtual DateTime DateFloor(DateTime dateTime)
Parameters:dateTimeDateTime

The time to round.

Returns:

DateTime

The time rounded down to the active view's cell interval or the hour boundary.

Draws a AppointmentPrintElement.

C#
protected void DrawAppointment(AppointmentPrintElement element, Graphics graphics, Rectangle bounds)
Parameters:elementAppointmentPrintElement

The element.

graphicsGraphics

The graphics used for drawing.

boundsRectangle

The bounds of the element.

Draws a AppointmentPrintElement.

C#
protected void DrawAppointment(AppointmentPrintElement element, Graphics graphics, RectangleF bounds)
Parameters:elementAppointmentPrintElement

The element.

graphicsGraphics

The graphics used for drawing.

boundsRectangleF

The bounds of the element.

Draws the content area of the page.

C#
protected abstract void DrawAppointmentsArea(Rectangle appArea, Graphics graphics, int pageNumber)
Parameters:appAreaRectangle

The bounds of the area.

graphicsGraphics

The graphics used for drawing.

pageNumberint

One-based number of the current page.

Draws a SchedulerPrintCellElement.

C#
protected void DrawCell(SchedulerPrintCellElement element, Graphics graphics, Rectangle bounds)
Parameters:elementSchedulerPrintCellElement

The element.

graphicsGraphics

The graphics used for drawing.

boundsRectangle

The bounds of the element.

Draws a SchedulerPrintCellElement.

C#
protected void DrawCell(SchedulerPrintCellElement element, Graphics graphics, RectangleF bounds)
Parameters:elementSchedulerPrintCellElement

The element.

graphicsGraphics

The graphics used for drawing.

boundsRectangleF

The bounds of the element.

Draws a RadPrintElement.

C#
protected void DrawElement(RadPrintElement element, Graphics graphics, Rectangle bounds)
Parameters:elementRadPrintElement

The element.

graphicsGraphics

The graphics used for drawing.

boundsRectangle

The bounds of the element.

Draws a RadPrintElement.

C#
protected void DrawElement(RadPrintElement element, Graphics graphics, RectangleF bounds)
Parameters:elementRadPrintElement

The element.

graphicsGraphics

The graphics used for drawing.

boundsRectangleF

The bounds of the element.

Draws an area for handwritten notes.

C#
protected virtual Rectangle DrawNotesArea(Graphics graphics, Rectangle drawingArea, int pageNumber)
Parameters:graphicsGraphics

The graphics used for drawing.

drawingAreaRectangle

The area in which the notes should be drawn.

pageNumberint

1-based consecutive number of the page to be drawn in.

Returns:

Rectangle

The bounds of the notes area.

Draws the page inside a given graphics area.

C#
public virtual void DrawPage(Graphics graphics, Rectangle drawingArea, int pageNumber)
Parameters:graphicsGraphics

The graphics used for drawing.

drawingAreaRectangle

The area in which the page should be drawn.

pageNumberint

One-based consecutive number of the page to be drawn.

Draws the page heading.

C#
protected virtual Rectangle DrawTopArea(Rectangle drawingArea, Graphics graphics, int pageNumber)
Parameters:drawingAreaRectangle

The area in which the heading should be drawn.

graphicsGraphics

The graphics used for drawing.

pageNumberint

The number of the page.

Returns:

Rectangle

The bounds of the top area.

Provides a lifecycle hook called when the Scheduler's print operation ends.

C#
public virtual void EndPrint()

Gets the appointments of the current source that are inside the time interval specified by the DateStartRange and DateEndRange properties.

C#
protected List<IEvent> GetAppointments()
Returns:

List<IEvent>

A list of appointments.

Gets timed appointments that overlap the configured daily time range and, when requested, all-day appointments for one date.

C#
protected List<IEvent> GetAppointments(DateTime date, bool includeAllday, IResource resource)
Parameters:dateDateTime

The date whose appointments are returned.

includeAlldaybool

true to include all-day appointments; otherwise, only timed appointments are included.

resourceIResource

An optional resource filter; null includes appointments for all resources.

Returns:

List<IEvent>

The matching appointments, ordered by start time, duration, and summary.

Gets the appointments of the current source that a given date contains.

C#
protected List<IEvent> GetAppointments(DateTime date, bool includeAllday)
Parameters:dateDateTime

The date.

includeAlldaybool

Indicate whether all-day appointments should be included.

Returns:

List<IEvent>

A list of appointments.

Gets appointments from the configured print date range, applies the daily time-window endpoint checks, optionally filters by resource, and sorts by appointment start time. The date arguments do not constrain results. For multi-day appointments, the checks use the appointment's start date for the window start and its end date for the window end, which can admit appointments that overlap neither day's window.

C#
protected List<IEvent> GetAppointments(DateTime startDate, DateTime endDate, IResource resource)
Parameters:startDateDateTime

A start-date bound; it does not filter the results in the current implementation.

endDateDateTime

An end-date bound; it does not filter the results in the current implementation.

resourceIResource

When non-null, restricts results to appointments assigned to this resource.

Returns:

List<IEvent>

Appointments in the configured print range that pass the daily time-window checks.

Gets appointments in the configured print date range and daily time window, ordering them by resource when requested. The supplied interval is also used to include overlapping all-day appointments.

C#
protected List<IEvent> GetAppointments(DateTime startDate, DateTime endDate, SchedulerPrintGroupType sortType)
Parameters:startDateDateTime

The start of the interval used to include all-day appointments.

endDateDateTime

The end of the interval used to include all-day appointments.

sortTypeSchedulerPrintGroupType

The grouping mode used to choose chronological or resource-based ordering.

Returns:

List<IEvent>

The matching appointments in the requested order.

Gets the appointments of the current source that are inside a specified time interval.

C#
protected List<IEvent> GetAppointments(DateTime startDate, DateTime endDate)
Parameters:startDateDateTime

The start date of the interval.

endDateDateTime

The end date of the interval.

Returns:

List<IEvent>

A list of appointments.

Gets the appointments of the current source that a given date contains.

C#
protected List<IEvent> GetAppointments(DateTime date)
Parameters:dateDateTime

The date.

Returns:

List<IEvent>

A list of appointments.

Returns the potential number of pages.

C#
public virtual int GetNumberOfPages(Rectangle pageBounds, Graphics g)
Parameters:pageBoundsRectangle

The bounds of the page.

gGraphics

The graphics object. Only used for measurement purposes.

Returns:

int

Gets the date that corresponds to a given page.

C#
protected virtual DateTime GetPageDate(int pageNumber)
Parameters:pageNumberint

The page number.

Returns:

DateTime

The date.

Gets the resource that corresponds to a given page.

C#
protected virtual IResource GetPageResource(int pageNumber)
Parameters:pageNumberint

The page number.

Returns:

IResource

The resource.

Gets a time rounded to the cells of the day view table.

C#
protected virtual DateTime GetRoundedDateTime(DateTime time, bool roundUp)
Parameters:timeDateTime

The time to round.

roundUpbool

If true time will rounded up, otherwise it will be rounded down.

Returns:

DateTime

Loads a bitmap from an embedded resource in the assembly that contains SchedulerPrintStyle.

C#
protected Image LoadImage(string name)
Parameters:namestring

The manifest resource name.

Returns:

Image

The bitmap loaded from the resource stream.

Exceptions: NullReferenceException

The manifest resource could not be found.

Raises AppointmentElementFormatting before an appointment print element is painted.

C#
protected virtual void OnAppointmentElementFormatting(PrintAppointmentEventArgs args)
Parameters:argsPrintAppointmentEventArgs

The appointment element that can be formatted before painting.

Provides the post-paint dispatch hook for appointment print elements. The base implementation gates dispatch on PrintElementFormatting rather than AppointmentElementPaint and invokes the latter without a null check, so the event can be skipped or a missing paint handler can throw.

C#
protected virtual void OnAppointmentElementPaint(PrintAppointmentPaintEventArgs args)
Parameters:argsPrintAppointmentPaintEventArgs

The painted appointment element, graphics context, and bounds.

Raises CellElementFormatting before a Scheduler cell is painted.

C#
protected virtual void OnCellElementFormatting(PrintSchedulerCellEventArgs args)
Parameters:argsPrintSchedulerCellEventArgs

The cell that can be formatted before painting.

Raises CellElementPaint after a Scheduler cell is painted.

C#
protected virtual void OnCellElementPaint(PrintSchedulerCellPaintEventArgs args)
Parameters:argsPrintSchedulerCellPaintEventArgs

The painted cell, graphics context, and bounds.

Raises PrintElementFormatting before a print element is painted.

C#
protected virtual void OnPrintElementFormatting(PrintElementEventArgs args)
Parameters:argsPrintElementEventArgs

The element that can be formatted before painting.

Raises PrintElementPaint after a print element is painted.

C#
protected virtual void OnPrintElementPaint(PrintElementPaintEventArgs args)
Parameters:argsPrintElementPaintEventArgs

The painted element, graphics context, and bounds.

Events

Fires when an appointment element is being formatted before it is painted.

C#
public event PrintAppointmentEventHandler AppointmentElementFormatting

Fires when an appointment element is painted.

C#
public event PrintAppointmentPaintEventHandler AppointmentElementPaint

Fires when a cell element is being formatted before it is painted.

C#
public event PrintSchedulerCellEventHandler CellElementFormatting

Fires when a cell element is painted.

C#
public event PrintSchedulerCellPaintEventHandler CellElementPaint

Fires when a print element is being formatted before it is painted.

C#
public event PrintElementEventHandler PrintElementFormatting

Fires when a print element is painted.

C#
public event PrintElementPaintEventHandler PrintElementPaint
In this article
DefinitionConstructorsSchedulerPrintStyle()SchedulerPrintStyle(DateTime, DateTime)PropertiesAppointmentFontDateEndRangeDateHeadingFontDateStartRangeDrawPageTitleDrawPageTitleCalendarGroupTypeHeadingAreaHeightIsGroupedNotesAreaWidthPageHeadingFontSchedulerShowLinedNotesAreaShowNotesAreaShowTimezoneTimeEndRangeTimeStartRangeTotalDaysMethodsClone()CompareAppointments(IEvent, IEvent)CompareAppointmentsByResource(IEvent, IEvent)CopyProperties(SchedulerPrintStyle)DateCeiling(DateTime)DateFloor(DateTime)DrawAppointment(AppointmentPrintElement, Graphics, Rectangle)DrawAppointment(AppointmentPrintElement, Graphics, RectangleF)DrawAppointmentsArea(Rectangle, Graphics, int)DrawCell(SchedulerPrintCellElement, Graphics, Rectangle)DrawCell(SchedulerPrintCellElement, Graphics, RectangleF)DrawElement(RadPrintElement, Graphics, Rectangle)DrawElement(RadPrintElement, Graphics, RectangleF)DrawNotesArea(Graphics, Rectangle, int)DrawPage(Graphics, Rectangle, int)DrawTopArea(Rectangle, Graphics, int)EndPrint()GetAppointments()GetAppointments(DateTime, bool, IResource)GetAppointments(DateTime, bool)GetAppointments(DateTime, DateTime, IResource)GetAppointments(DateTime, DateTime, SchedulerPrintGroupType)GetAppointments(DateTime, DateTime)GetAppointments(DateTime)GetNumberOfPages(Rectangle, Graphics)GetPageDate(int)GetPageResource(int)GetRoundedDateTime(DateTime, bool)LoadImage(string)OnAppointmentElementFormatting(PrintAppointmentEventArgs)OnAppointmentElementPaint(PrintAppointmentPaintEventArgs)OnCellElementFormatting(PrintSchedulerCellEventArgs)OnCellElementPaint(PrintSchedulerCellPaintEventArgs)OnPrintElementFormatting(PrintElementEventArgs)OnPrintElementPaint(PrintElementPaintEventArgs)EventsAppointmentElementFormattingAppointmentElementPaintCellElementFormattingCellElementPaintPrintElementFormattingPrintElementPaint
Not finding the help you need?
Contact Support