VsTextManagerClass.NavigateToPosition Method
Finds or creates an appropriate view on the specified buffer and puts the selection on the specified linear position.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'宣言
Public Overridable Function NavigateToPosition ( _
pBuffer As IVsTextBuffer, _
ByRef guidDocViewType As Guid, _
iPos As Integer, _
iLen As Integer _
) As Integer
'使用
Dim instance As VsTextManagerClass
Dim pBuffer As IVsTextBuffer
Dim guidDocViewType As Guid
Dim iPos As Integer
Dim iLen As Integer
Dim returnValue As Integer
returnValue = instance.NavigateToPosition(pBuffer, _
guidDocViewType, iPos, iLen)
public virtual int NavigateToPosition(
IVsTextBuffer pBuffer,
ref Guid guidDocViewType,
int iPos,
int iLen
)
public:
virtual int NavigateToPosition(
[InAttribute] IVsTextBuffer^ pBuffer,
[InAttribute] Guid% guidDocViewType,
[InAttribute] int iPos,
[InAttribute] int iLen
)
public function NavigateToPosition(
pBuffer : IVsTextBuffer,
guidDocViewType : Guid,
iPos : int,
iLen : int
) : int
Parameters
pBuffer
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer[in] Pointer to the IVsTextBuffer interface.
guidDocViewType
Type: System.Guid%[in] GUID identifying the view. This value should always be LOGVIEWID_TextView.
iPos
Type: System.Int32[in] Linear position in buffer on which to put the caret.
iLen
Type: System.Int32[in] Length of selection.
Return Value
Type: System.Int32
Implements
IVsTextManager.NavigateToPosition(IVsTextBuffer, Guid%, Int32, Int32)
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.