Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Explicitly positions the Tablet PC Input Panel in screen coordinates.
Namespace: Microsoft.Ink.TextInput
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
<UIPermissionAttribute(SecurityAction.Demand, Window := UIPermissionWindow.SafeTopLevelWindows)> _
<SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted := True)> _
Public Sub SetInPlacePosition ( _
x As Integer, _
y As Integer, _
position As CorrectionPosition _
)
'Usage
Dim instance As TextInputPanel
Dim x As Integer
Dim y As Integer
Dim position As CorrectionPosition
instance.SetInPlacePosition(x, y, position)
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
[UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.SafeTopLevelWindows)]
[SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true)]
public void SetInPlacePosition(
int x,
int y,
CorrectionPosition position
)
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
[UIPermissionAttribute(SecurityAction::Demand, Window = UIPermissionWindow::SafeTopLevelWindows)]
[SecurityPermissionAttribute(SecurityAction::Demand, Unrestricted = true)]
public:
void SetInPlacePosition(
int x,
int y,
CorrectionPosition position
)
public function SetInPlacePosition(
x : int,
y : int,
position : CorrectionPosition
)
Parameters
- x
Type: System.Int32
- y
Type: System.Int32
- position
Type: Microsoft.Ink.TextInput.CorrectionPosition
Remarks
Consider the height of the correction comb in order to keep the Input Panel and correction comb on screen while deciding where to position the Input Panel. The direction specified in the position parameter overrides the direction set using the PreferredInPlaceDirection.
There are no restrictions on where the Input Panel can be positioned. It is the responsibility of the application developer to make sure the Input Panel does not go off the screen. The InPlaceBoundingRectangle, PopUpCorrectionHeight, and PopDownCorrectionHeight, along with the InPlaceSizeChanging can be used for this purpose.
This method is synchronous. Positioning occurs before the method returns.
Examples
The following example demonstrates the use of SetInPlacePosition. The tip object is an instance of TextInputPanel. In this example xInPlacePositionTextBox.Text and yInPlacePositionTextBox.Text are TextBox.Text properties that contain the values used in setting the x and y screen coordinates for positioning the Tablet PC Input Panel. An editable field where the focus is placed is represented by the TextBox control, textBox1.
textBox1.Focus()
Dim xPosition As Integer = Convert.ToInt32(xInPlacePositionTextBox.Text, 10)
Dim yPosition As Integer = Convert.ToInt32(yInPlacePositionTextBox.Text, 10)
tip.SetInPlacePosition(xPosition, yPosition, CorrectionPosition.Bottom)
textBox1.Focus();
int xPosition = Convert.ToInt32(xInPlacePositionTextBox.Text, 10);
int yPosition = Convert.ToInt32(yInPlacePositionTextBox.Text, 10);
tip.SetInPlacePosition(xPosition, yPosition, CorrectionPosition.Bottom);
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
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