MultiRow Windows Forms > Developer's Guide > Using MultiRow > Print and Print Preview > Printing Watermarks |
You can print data with a watermark inserted in its background in MultiRow.
You can set the PrintSettings.Watermark property to image type data for setting the watermark.
This example sets the Watermark property.
GcMultiRow1.PrintSettings.Watermark = New Bitmap("test.bmp") |
gcMultiRow1.PrintSettings.Watermark = new Bitmap(@"test.bmp"); |
You can use the PrintSettings.WatermarkAlignment property to set the location of the watermark.
This example sets the WatermarkAlignment property.
GcMultiRow1.PrintSettings.WatermarkAlignment = ContentAlignment.BottomRight |
gcMultiRow1.PrintSettings.WatermarkAlignment = ContentAlignment.BottomRight; |
You can use the PrintSettings.WatermarkSizeMode property to set the size of the watermark.
This example sets the WatermarkSizeMode property.
GcMultiRow1.PrintSettings.WatermarkSizeMode = GrapeCity.Win.MultiRow.SizeMode.Stretch |
gcMultiRow1.PrintSettings.WatermarkSizeMode = GrapeCity.Win.MultiRow.SizeMode.Stretch; |
You can use the PrintSettings.WatermarkPrintOnPages property to set the page(s) on which you want to print the watermark.
This example sets the WatermarkPrintOnPages property.
GcMultiRow1.PrintSettings.WatermarkPrintOnPages = "3-5" |
gcMultiRow1.PrintSettings.WatermarkPrintOnPages = "3-5"; |
You can use the PrintSettings.WatermarkOpacity property to set the opacity of the watermark.
This example sets the WatermarkOpacity property.
GcMultiRow1.PrintSettings.WatermarkOpacity = 0.5 |
gcMultiRow1.PrintSettings.WatermarkOpacity = 0.5; |
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.
This example prints the watermark.
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 |
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; |