IFormattedLine.SetSnapshot Method
Sets the ITextSnapshot objects upon which this formatted text line is based.
Namespace: Microsoft.VisualStudio.Text.Formatting
Assembly: Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)
Syntax
'Déclaration
Sub SetSnapshot ( _
visualSnapshot As ITextSnapshot, _
editSnapshot As ITextSnapshot _
)
void SetSnapshot(
ITextSnapshot visualSnapshot,
ITextSnapshot editSnapshot
)
void SetSnapshot(
ITextSnapshot^ visualSnapshot,
ITextSnapshot^ editSnapshot
)
abstract SetSnapshot :
visualSnapshot:ITextSnapshot *
editSnapshot:ITextSnapshot -> unit
function SetSnapshot(
visualSnapshot : ITextSnapshot,
editSnapshot : ITextSnapshot
)
Parameters
- visualSnapshot
Type: Microsoft.VisualStudio.Text.ITextSnapshot
The new snapshot for the line in the view model's visual buffer.
- editSnapshot
Type: Microsoft.VisualStudio.Text.ITextSnapshot
The new snapshot for the line in the view model's edit buffer.
Exceptions
Exception | Condition |
---|---|
ObjectDisposedException | This IWpfTextViewLine has been disposed. |
Remarks
The length of this text line is not allowed to change as a result of changing the snapshot.
.NET Framework Security
- 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.