Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Ruft das globale UndoContext-Objekt ab.
Namespace: EnvDTE80
Assembly: EnvDTE80 (in EnvDTE80.dll)
Syntax
'Declaration
ReadOnly Property UndoContext As UndoContext
Get
UndoContext UndoContext { get; }
property UndoContext^ UndoContext {
UndoContext^ get ();
}
abstract UndoContext : UndoContext
function get UndoContext () : UndoContext
Eigenschaftswert
Typ: EnvDTE.UndoContext
Ein UndoContext-Objekt.
Implementiert
Beispiele
Sub UndoContextExample()
Dim selection As TextSelection = DTE2.ActiveDocument.Selection()
Dim start As EditPoint = selection.TopPoint.CreateEditPoint()
Dim endpt As TextPoint = selection.BottomPoint
Dim commentStart As String
DTE2.UndoContext.Open("Comment Region")
Try
Do While (start.LessThan(endpt))
start.Insert(commentStart)
start.LineDown()
start.StartOfLine()
Loop
Finally
' If an error occured, then need to make sure that the undo
' context is cleaned up. Otherwise, the editor can be left in a
' perpetual undo context.
DTE2.UndoContext.Close()
End Try
End Sub
.NET Framework-Sicherheit
- Volle Vertrauenswürdigkeit für den unmittelbaren Aufrufer. Dieser Member kann von nur teilweise vertrauenswürdigem Code nicht verwendet werden. Weitere Informationen finden Sie unter Verwenden von Bibliotheken aus teilweise vertrauenswürdigem Code.