Gets the margins of the loaded document's pages. If the document does not contain margins the values are set to -1.

Syntax

public PageMargins PageMargins { get; }
Public ReadOnly Property PageMargins() As PageMargins

Examples

This example demonstrates an easy use of the 'TXTextControl.LoadSettings.PageMargins' property. Here, it is stored in a variable of the type 'TXTextControl.PageMargins'.

TXTextControl.LoadSettings ls = new TXTextControl.LoadSettings();
TXTextControl.PageMargins myPageMargins = ls.PageMargins;
//...
if (myPageMargins.Bottom == -1 && myPageMargins.Left == -1 && myPageMargins.Top == -1 && myPageMargins.Right == -1) {
    System.Windows.Forms.MessageBox.Show("The document does not contain any margins!");
}// else...
Dim ls As TXTextControl.LoadSettings = New TXTextControl.LoadSettings()
Dim myPageMargins As TXTextControl.PageMargins = ls.PageMargins
'...
If myPageMargins.Bottom = -1 And myPageMargins.Left = -1 And myPageMargins.Top = -1 And myPageMargins.Right = -1 Then
    System.Windows.Forms.MessageBox.Show("The document does not contain any margins!")
End If
'...

Limitations

Read only.