Back to Devexpress

SheetView.Margins Property

officefileapi-devexpress-dot-spreadsheet-dot-sheetview-e7e1a17e.md

latest4.4 KB
Original Source

SheetView.Margins Property

Returns an object that defines page margins for a printed sheet.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
Margins Margins { get; }
vb
ReadOnly Property Margins As Margins

Property Value

TypeDescription
Margins

An object used to specify margin settings.

|

Remarks

Page margins are specified in measurement units defined in a workbook. See the following topic for details: Measure Units.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Margins property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-spreadsheet-chart-api/CS/SpreadsheetWPFChartAPISamples/CodeExamples/ChartSheetActions.cs#L149

csharp
// Specify page margins.
Margins pageMargins = chartSheet.ActiveView.Margins;
pageMargins.Left = 0.7F;

winforms-spreadsheet-chart-api/CS/SpreadsheetChartAPISamples/CodeExamples/ChartSheetActions.cs#L149

csharp
// Specify page margins.
Margins pageMargins = chartSheet.ActiveView.Margins;
pageMargins.Left = 0.7F;

spreadsheet-document-api-examples-part1/CS/SpreadsheetExamples/SpreadsheetActions/WorksheetActions.cs#L152

csharp
// Access page margins.
Margins pageMargins = workbook.Worksheets[0].ActiveView.Margins;

wpf-spreadsheet-chart-api/VB/SpreadsheetWPFChartAPISamples/CodeExamples/ChartSheetActions.vb#L144

vb
' Specify page margins.
Dim pageMargins As Margins = chartSheet.ActiveView.Margins
pageMargins.Left = 0.7F

winforms-spreadsheet-chart-api/VB/SpreadsheetChartAPISamples/CodeExamples/ChartSheetActions.vb#L143

vb
' Specify page margins.
Dim pageMargins As Margins = chartSheet.ActiveView.Margins
pageMargins.Left = 0.7F

spreadsheet-document-api-examples-part1/VB/SpreadsheetExamples/SpreadsheetActions/WorksheetActions.vb#L145

vb
' Access page margins.
Dim pageMargins As Margins = workbook.Worksheets(0).ActiveView.Margins
' Specify page margins.

See Also

How to: Set Page Margins

How to: Specify Chart Sheet Print Options

SheetView Interface

SheetView Members

DevExpress.Spreadsheet Namespace