'宣言 Public Property PageHeaderBorderStyle As Infragistics.Win.UIElementBorderStyle
public Infragistics.Win.UIElementBorderStyle PageHeaderBorderStyle {get; set;}
レポート ヘッダーで使用できる境界線スタイルは、セル、行、および列ヘッダーなどの UltraWinGrid オブジェクトの他のタイプで使用できるものと同じです。デフォルト設定を選択すると、ページ ヘッダーは境界なしで描画されます。
すべてのオペレーティング システムですべてのスタイルが使用可能ではないことに注意してください。プログラムを実行している OS バージョンが特定の境界線スタイルをサポートしていない場合、そのスタイルで書式設定された境界線は実線で表示されます。
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub UltraGrid1_InitializePrint(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CancelablePrintEventArgs) Handles ultraGrid1.InitializePrint ' One could conditionally set Cancel to true to cancel the printing. If Me.CheckBox1.Checked Then e.Cancel = True Return End If ' 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_InitializePrint(object sender, Infragistics.Win.UltraWinGrid.CancelablePrintEventArgs e) { // One could conditionally set Cancel to true to cancel the printing. if ( this.checkBox1.Checked ) { e.Cancel = true; return; } // 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"; }