Gets or sets a value indicating whether horizontal and/or vertical margins should be hidden.
Namespace:
C1.Win.C1PreviewAssembly: C1.Win.C1Report.2 (in C1.Win.C1Report.2.dll)
Syntax
C# |
---|
[DefaultValueAttribute(HideMarginsFlags.None)] public HideMarginsFlags HideMarginsState { get; set; } |
Visual Basic |
---|
<DefaultValueAttribute(HideMarginsFlags.None)> _ Public Property HideMarginsState As HideMarginsFlags Get Set |
Remarks
The default value for this property is None.
Examples
The following example uses to the HideMarginsState property to hide the horizontal and vertical margins:
Copy CodeVisual Basic
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) C1PrintPreviewControl1.PreviewPane.ZoomFactor = 1 ' Because we want to show a wide table, we adjust the properties of the preview accordingly and hide all margins. C1PrintPreviewControl1.PreviewPane.HideMarginsState = C1.Win.C1Preview.HideMarginsFlags.All ' Do not allow the user to show margins. C1PrintPreviewControl1.PreviewPane.HideMargins = C1.Win.C1Preview.HideMarginsFlags.None ' Set padding between pages with hidden margins to 0, so that no gap is visible. C1PrintPreviewControl1.PreviewPane.PagesPaddingSmall = New Size(0, 0) ' Set the zoom mode. C1PrintPreviewControl1.PreviewPane.ZoomMode = C1.Win.C1Preview.ZoomModeEnum.PageWidth ' Make the document. MakeDoc1(C1PrintDocument1) C1PrintDocument1.Reflow End Sub |
Copy CodeC#
private void Form1_Load(object sender, EventArgs e) { c1PrintPreviewControl1.PreviewPane.ZoomFactor = 1; // Because we want to show a wide table, we adjust the properties of the preview accordingly and hide all margins. c1PrintPreviewControl1.PreviewPane.HideMarginsState = C1.Win.C1Preview.HideMarginsFlags.All; // Do not allow the user to show margins. c1PrintPreviewControl1.PreviewPane.HideMargins = C1.Win.C1Preview.HideMarginsFlags.None; // Set padding between pages with hidden margins to 0, so that no gap is visible. c1PrintPreviewControl1.PreviewPane.PagesPaddingSmall = new Size(0, 0); // Set the zoom mode. c1PrintPreviewControl1.PreviewPane.ZoomMode = C1.Win.C1Preview.ZoomModeEnum.PageWidth; // Make the document. MakeDoc1(c1PrintDocument1); c1PrintDocument1.Reflow(); } |