GrapeCity MultiRow Windows Forms Documentation
Printing Watermarks

You can print data with a watermark inserted in its background in MultiRow.

Setting the Watermark

You can set the PrintSettings.Watermark property to image type data for setting the watermark.

Using Code

This example sets the Watermark property.

[VB]

GcMultiRow1.PrintSettings.Watermark = New Bitmap("test.bmp")

[CS]

gcMultiRow1.PrintSettings.Watermark = new Bitmap(@"test.bmp");

Aligning the Watermark

You can use the PrintSettings.WatermarkAlignment property to set the location of the watermark.

Using Code

This example sets the WatermarkAlignment property.

[VB]

GcMultiRow1.PrintSettings.WatermarkAlignment = ContentAlignment.BottomRight

[CS]

gcMultiRow1.PrintSettings.WatermarkAlignment = ContentAlignment.BottomRight;

Size of the Watermark

You can use the PrintSettings.WatermarkSizeMode property to set the size of the watermark.

Using Code

This example sets the WatermarkSizeMode property.

[VB]

GcMultiRow1.PrintSettings.WatermarkSizeMode = GrapeCity.Win.MultiRow.SizeMode.Stretch

[CS]

gcMultiRow1.PrintSettings.WatermarkSizeMode = GrapeCity.Win.MultiRow.SizeMode.Stretch;

Specifying Pages for Printing the Watermark

You can use the PrintSettings.WatermarkPrintOnPages property to set the page(s) on which you want to print the watermark.

Using Code

This example sets the WatermarkPrintOnPages property.

[VB]

GcMultiRow1.PrintSettings.WatermarkPrintOnPages = "3-5"

[CS]

gcMultiRow1.PrintSettings.WatermarkPrintOnPages = "3-5";

Opacity of the Watermark

You can use the PrintSettings.WatermarkOpacity property to set the opacity of the watermark.

Using Code

This example sets the WatermarkOpacity property.

[VB]

GcMultiRow1.PrintSettings.WatermarkOpacity = 0.5

[CS]

gcMultiRow1.PrintSettings.WatermarkOpacity = 0.5;

Displaying the Watermark in the Foreground

By default, the watermark that overlaps the grid is not printed, but if the Section.PrintBackground property is set to False, you can print with the watermark displayed in the foreground.

Displaying the Watermark in the Foreground

Using Code

This example prints the watermark.

[VB]

Imports GrapeCity.Win.MultiRow 
Dim textBoxCell1 As New TextBoxCell() textBoxCell1.Name = "textBoxCell1" 
Dim textBoxCell2 As New TextBoxCell() textBoxCell2.Name = "textBoxCell2" 
Dim template As Template = template.CreateGridTemplate(New Cell() {textBoxCell1, textBoxCell2})
template.Row.PrintBackground = False 
GcMultiRow1.Template = template GcMultiRow1.RowCount = 10

[CS]

using
GrapeCity.Win.MultiRow; 
TextBoxCell textBoxCell1 = new TextBoxCell(); 
textBoxCell1.Name = "textBoxCell1"; 
TextBoxCell textBoxCell2 = new TextBoxCell();
textBoxCell2.Name = "textBoxCell2"; 
Template template = Template.CreateGridTemplate(new Cell[] {textBoxCell1, textBoxCell2}); 
template.Row.PrintBackground = false; gcMultiRow1.Template = template; 
gcMultiRow1.RowCount = 10;
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options