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

A control which is responsible for displaying print documents.

Definition

Constructors

Initializes the preview background and default page-shadow color.

C#
public RadPrintPreviewControl()

Properties

Gets or sets the border color for each page.

C#
public Color PageBorderColor { get; set; }

Gets or sets the inner border color for each page.

C#
public Color PageInnerBorderColor { get; set; }

Gets or sets the color used to fill the page shadows.

C#
public Color PageShadowColor { get; set; }

Gets or sets the current scroll position.

C#
public Point ScrollOffset { get; set; }

Gets or sets the page-shadow thickness before zoom scaling; the rendered shadow is capped at 10 pixels.

C#
public int ShadowThickness { get; set; }

Methods

Draws the configured borders and zoom-scaled shadows around the rendered preview pages.

C#
protected override void OnPaint(PaintEventArgs pevent)
Parameters:peventPaintEventArgs

The paint event data.

Overrides: PrintPreviewControl.OnPaint(PaintEventArgs)

Converts a length in hundredths of an inch to pixels at the supplied display resolution.

C#
public static int PhysicalToPixels(int physicalSize, int dpi)
Parameters:physicalSizeint

The length in hundredths of an inch.

dpiint

The display resolution in pixels per inch.

Returns:

int

The corresponding length in pixels.

Converts each coordinate from hundredths of an inch to pixels using its corresponding axis resolution.

C#
public static Point PhysicalToPixels(Point physical, Point dpi)
Parameters:physicalPoint

The point in hundredths of an inch.

dpiPoint

The horizontal and vertical display resolutions in pixels per inch.

Returns:

Point

The converted point in pixels.

Converts a pixel count to hundredths of an inch using the supplied display resolution.

C#
public static int PixelsToPhysical(int pixels, int dpi)
Parameters:pixelsint

The length in pixels.

dpiint

The display resolution in pixels per inch.

Returns:

int

The corresponding length in hundredths of an inch.

Converts each coordinate from pixels to hundredths of an inch using its corresponding axis resolution.

C#
public static Point PixelsToPhysical(Point pixels, Point dpi)
Parameters:pixelsPoint

The point in pixels.

dpiPoint

The horizontal and vertical display resolutions in pixels per inch.

Returns:

Point

The converted point in hundredths of an inch.