InkPicture.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
Public Property MarginY As Integer
'Usage
Dim instance As InkPicture
Dim value As Integer
value = instance.MarginY
instance.MarginY = value
public int MarginY { get; set; }
public:
property int MarginY {
int get ();
void set (int value);
}
/** @property */
public int get_MarginY ()
/** @property */
public void set_MarginY (int value)
public function get MarginY () : int
public function set MarginY (value : int)
Not applicable.
Property Value
The margins along the y-axis, in pixels.
Value |
Meaning |
---|---|
DefaultMargin property |
The DefaultMargin field of the InkPicture control. Default. |
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 InkPicture control, 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 InkPicture control must be disabled before setting this property. To disable ink collection on the InkPicture control, set the InkEnabled property to false. You can then set the MarginY property, and re-enable ink collection on the control by setting the InkEnabled property to true.
Example
This C# example sets the y-axis margin of a window rectangle for an InkPicture control, theInkPicture
, to five pixels.
[C#]
theInkPicture.MarginY = 5;
This Microsoft® Visual Basic® .NET example sets the y-axis margin of a window rectangle for an InkPicture control, theInkPicture
, to five pixels.
[Visual Basic]
theInkPicture.MarginY = 5
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
See Also
Reference
InkPicture Class
InkPicture Members
Microsoft.Ink Namespace
InkPicture.DefaultMargin
InkPicture.GetWindowInputRectangle
InkPicture.InkEnabled
InkPicture.MarginX