PageSetupDialog.EnableMetric Property (System.Windows.Forms)

Switch View :
ScriptFree
PageSetupDialog.EnableMetric Property
Gets or sets a value indicating whether the margin settings, when displayed in millimeters, should be automatically converted to and from hundredths of an inch.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

Syntax

Visual Basic (Declaration)
Public Property EnableMetric As Boolean
Visual Basic (Usage)
Dim instance As PageSetupDialog
Dim value As Boolean

value = instance.EnableMetric

instance.EnableMetric = value
C#
public bool EnableMetric { get; set; }
C++
public:
property bool EnableMetric {
	bool get ();
	void set (bool value);
}
J#
/** @property */
public boolean get_EnableMetric ()

/** @property */
public void set_EnableMetric (boolean value)

JScript
public function get EnableMetric () : boolean

public function set EnableMetric (value : boolean)

XAML
Not applicable.

Property Value

true if the margins should be automatically converted; otherwise, false. The default is false.
Remarks

The PageSettings class measures PageSettings.Margins in hundredths of an inch, but the PageSetupDialog allows users to set margins in inches or millimeters depending on the culture settings for the system running the application.

In the .NET Framework version 2.0, you should set this property to true if your application could be used in cultures that measure document margins in millimeters. If you are doing this conversion yourself, as was required in versions of the .NET Framework earlier than version 2.0, you should use the default value of false.

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0, 2.0
See Also