Compartilhar via


IWpfDifferenceViewer.Initialize Method

Definition

Initialize the DifferenceViewer, hooking it to the specified buffer and using the callback to create the text view hosts.

public void Initialize (Microsoft.VisualStudio.Text.Differencing.IDifferenceBuffer differenceBuffer, Microsoft.VisualStudio.Text.Differencing.CreateTextViewHostCallback createTextViewHost, Microsoft.VisualStudio.Text.Editor.IEditorOptions parentOptions = default);
abstract member Initialize : Microsoft.VisualStudio.Text.Differencing.IDifferenceBuffer * Microsoft.VisualStudio.Text.Differencing.CreateTextViewHostCallback * Microsoft.VisualStudio.Text.Editor.IEditorOptions -> unit
Public Sub Initialize (differenceBuffer As IDifferenceBuffer, createTextViewHost As CreateTextViewHostCallback, Optional parentOptions As IEditorOptions = Nothing)

Parameters

differenceBuffer
IDifferenceBuffer
createTextViewHost
CreateTextViewHostCallback
parentOptions
IEditorOptions

Remarks

This method should only be called if the CreateUninitializedDifferenceView method on the IWpfDifferenceViewerFactoryService is used. Otherwise, it is called by the factory.

The viewer does not have to be initialized immediately. You can wait until the Loaded event on the VisualElement.

Applies to