Share via


PenInputPanel.HorizontalOffset Property

Deprecated. Gets or sets the offset between the left edge of the pen input panel and the left edge of the control to which it is attached. PenInputPanel has been replaced by Microsoft.Ink.TextInput.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public Property HorizontalOffset As Integer
'Usage
Dim instance As PenInputPanel 
Dim value As Integer 

value = instance.HorizontalOffset

instance.HorizontalOffset = value
public int HorizontalOffset { get; set; }
public:
property int HorizontalOffset {
    int get ();
    void set (int value);
}
public function get HorizontalOffset () : int 
public function set HorizontalOffset (value : int)

Property Value

Type: System.Int32
The offset between the left edge of the pen input panel and the left edge of the control to which it is attached.

Value

Meaning

24

The number of pixels equal to 0.25 inches at 96 dots per inch (dpi).

30

The number of pixels equal to 0.25 inches at 120 dpi.

33

The number of pixels equal to 0.25 inches at 133 dpi.

Remarks

The default value is the equivalent of 0.25 inches in pixels and is dependent on screen resolution settings. A negative value indicates a shift to the left of the control. A positive value indicates a shift to the right. A zero value indicates that the left edge of the pen input panel is positioned exactly at the left edge of the control.

If the new position causes the panel to appear outside the boundary of the screen working area, the panel is shifted toward the center of the working area so that the edges of the panel are adjacent to the nearest edges of the screen, plus or minus the default offset value.

Security noteSecurity Note:

If using under partial trust, this property requires SecurityPermissionFlag.AllFlags permission, in addition to the permissions required by PenInputPanel. See Security and Trust for more information.

Examples

This C# example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, theInkEdit. It then sets the horizontal (x-axis) position of thePenInputPanel to 100 pixels to the right of theInkEdit control's left edge, by using the HorizontalOffset property.

[C#]

// Declare, create, and attach a new PenInputPanel to an InkEdit control
PenInputPanel thePenInputPanel = new PenInputPanel(theInkEdit);

// Set the horizontal position of the pen input panel
thePenInputPanel.HorizontalOffset = 100;

This Microsoft® Visual Basic® .NET example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, theInkEdit. It then sets the horizontal (x-axis) position of thePenInputPanel to 100 pixels to the right of theInkEdit control's left edge, by using the HorizontalOffset property.

[Visual Basic]

' Declare, create, and attach a new PenInputPanel to an InkEdit control
Dim thePenInputPanel As New PenInputPanel(theInkEdit)

' Set the horizontal position of the pen input panel
thePenInputPanel.HorizontalOffset = 100

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

See Also

Reference

PenInputPanel Class

PenInputPanel Members

Microsoft.Ink Namespace

PenInputPanel.VerticalOffset