InkOverlay.MarginY Property
Gets or sets the margins along the y-axis, in pixels.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
<BrowsableAttribute(True)> _
Public Property MarginY As Integer
'Usage
Dim instance As InkOverlay
Dim value As Integer
value = instance.MarginY
instance.MarginY = value
[BrowsableAttribute(true)]
public int MarginY { get; set; }
[BrowsableAttribute(true)]
public:
property int MarginY {
int get ();
void set (int value);
}
public function get MarginY () : int
public function set MarginY (value : int)
Property Value
Type: System.Int32
The margins along the y-axis, in pixels.
Value |
Meaning |
---|---|
DefaultMargin property |
The DefaultMargin field of the InkOverlay control. |
Int32 |
The application-defined margins along the y-axis. |
Remarks
This margin provides a buffer around the edge of the ink window. The DefaultMargin field specifies the default margin that the MarginY property uses.
This property is most commonly used with nonintegrated tablet devices. The buffer gives users a margin of error when writing on a device that may not map directly to the size of the display screen.
A positive margin extends outside the bounds of the InkOverlay object, a negative margin extends inside the bounds of the control, and a value of zero produces no margin. Ink is collected if the stroke starts within the margin.
This behavior does not clip the ink. The bounds of the control are either the GetWindowInputRectangle property or the client rectangle for the window.
The margin is effective only within the application's window. If the pen is applied outside the application's window, then the application loses focus and cannot collect ink.
Note
Ink collection on the InkOverlay object must be disabled before setting this property. To disable ink collection on the InkOverlay object, set the Enabled property to false. You can then set the MarginY property, and re-enable ink collection on the control by setting the Enabled property to true.
Examples
The following example sets the y-axis margin of a window rectangle for an InkOverlay to five pixels.
mInkOverlay.Enabled = False
mInkOverlay.MarginY = 5
mInkOverlay.Enabled = True
mInkOverlay.Enabled = false;
mInkOverlay.MarginY = 5;
mInkOverlay.Enabled = true;
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0