TextInputPanel.SetInPlacePosition - метод
Обновлен: Ноябрь 2007
Explicitly positions the Tablet PC Input Panel in screen coordinates.
Пространство имен: Microsoft.Ink.TextInput
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
<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 _
)
'Применение
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
)
/** @attribute PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust") */
/** @attribute UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.SafeTopLevelWindows) */
/** @attribute SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true) */
public void SetInPlacePosition(
int x,
int y,
CorrectionPosition position
)
public function SetInPlacePosition(
x : int,
y : int,
position : CorrectionPosition
)
Параметры
- x
Тип: System.Int32
- y
Тип: System.Int32
- position
Тип: Microsoft.Ink.TextInput.CorrectionPosition
Заметки
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.
Примеры
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);
Платформы
Windows Vista, Windows XP с пакетом обновления 2 (SP2), Windows Server 2003
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0