バージョン

Zoom プロパティ

印刷プレビュー ウィンドウのズーム レベルを決定する値を返すか、設定します。
シンタックス
'宣言
 
Public Property Zoom As Double
public double Zoom {get; set;}
解説

Zoom プロパティは、Print Preview ダイアログが最初に表示される時に有効になるズームのレベルを指定します。印刷プレビューが表示されると、ユーザーはダイアログで利用できるコントロールを使用してズーム レベルを変更できます。

1.0 の値はフルサイズのページ (100%) を表示します。デフォルト値は -1 で、ページのサイズを自動的に設定するので、フルサイズのページがダイアログで表示可能です。

使用例
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub UltraGrid1_InitializePrintPreview(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CancelablePrintPreviewEventArgs) Handles ultraGrid1.InitializePrintPreview

      ' Set the zomm level to 100 % in the print preview.
      e.PrintPreviewSettings.Zoom = 1.0

      ' Set the location and size of the print preview dialog.
      e.PrintPreviewSettings.DialogLeft = SystemInformation.WorkingArea.X
      e.PrintPreviewSettings.DialogTop = SystemInformation.WorkingArea.Y
      e.PrintPreviewSettings.DialogWidth = SystemInformation.WorkingArea.Width
      e.PrintPreviewSettings.DialogHeight = SystemInformation.WorkingArea.Height

      ' Horizontally fit everything in a signle page.
      e.DefaultLogicalPageLayoutInfo.FitWidthToPages = 1

      ' Set up the header and the footer.
      e.DefaultLogicalPageLayoutInfo.PageHeader = "Title"
      e.DefaultLogicalPageLayoutInfo.PageHeaderHeight = 40
      e.DefaultLogicalPageLayoutInfo.PageHeaderAppearance.FontData.SizeInPoints = 14
      e.DefaultLogicalPageLayoutInfo.PageHeaderAppearance.TextHAlign = HAlign.Center
      e.DefaultLogicalPageLayoutInfo.PageHeaderBorderStyle = UIElementBorderStyle.Solid

      ' Use <#> token in the string to designate page numbers.
      e.DefaultLogicalPageLayoutInfo.PageFooter = "Page <#>."
      e.DefaultLogicalPageLayoutInfo.PageFooterHeight = 40
      e.DefaultLogicalPageLayoutInfo.PageFooterAppearance.TextHAlign = HAlign.Right
      e.DefaultLogicalPageLayoutInfo.PageFooterAppearance.FontData.Italic = DefaultableBoolean.True
      e.DefaultLogicalPageLayoutInfo.PageFooterBorderStyle = UIElementBorderStyle.Solid

      ' Set the ClippingOverride to Yes.
      e.DefaultLogicalPageLayoutInfo.ClippingOverride = ClippingOverride.Yes

      ' Set the document name through the PrintDocument which returns a PrintDocument object.
      e.PrintDocument.DocumentName = "Document Name"

  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void ultraGrid1_InitializePrintPreview(object sender, Infragistics.Win.UltraWinGrid.CancelablePrintPreviewEventArgs e)
{

	// Set the zomm level to 100 % in the print preview.
	e.PrintPreviewSettings.Zoom = 1.0;

	// Set the location and size of the print preview dialog.
	e.PrintPreviewSettings.DialogLeft = SystemInformation.WorkingArea.X;
	e.PrintPreviewSettings.DialogTop = SystemInformation.WorkingArea.Y;
	e.PrintPreviewSettings.DialogWidth = SystemInformation.WorkingArea.Width;
	e.PrintPreviewSettings.DialogHeight  = SystemInformation.WorkingArea.Height;

	// Horizontally fit everything in a signle page.
	e.DefaultLogicalPageLayoutInfo.FitWidthToPages = 1;

	// Set up the header and the footer.
	e.DefaultLogicalPageLayoutInfo.PageHeader = "Title";
	e.DefaultLogicalPageLayoutInfo.PageHeaderHeight = 40;
	e.DefaultLogicalPageLayoutInfo.PageHeaderAppearance.FontData.SizeInPoints = 14;
	e.DefaultLogicalPageLayoutInfo.PageHeaderAppearance.TextHAlign = HAlign.Center;
	e.DefaultLogicalPageLayoutInfo.PageHeaderBorderStyle = UIElementBorderStyle.Solid;
	
	// Use <#> token in the string to designate page numbers.
	e.DefaultLogicalPageLayoutInfo.PageFooter = "Page <#>.";
	e.DefaultLogicalPageLayoutInfo.PageFooterHeight= 40;
	e.DefaultLogicalPageLayoutInfo.PageFooterAppearance.TextHAlign = HAlign.Right;
	e.DefaultLogicalPageLayoutInfo.PageFooterAppearance.FontData.Italic = DefaultableBoolean.True;
	e.DefaultLogicalPageLayoutInfo.PageFooterBorderStyle = UIElementBorderStyle.Solid;

	// Set the ClippingOverride to Yes.
	e.DefaultLogicalPageLayoutInfo.ClippingOverride = ClippingOverride.Yes;

	// Set the document name through the PrintDocument which returns a PrintDocument object.
	e.PrintDocument.DocumentName = "Document Name";

}
参照