Compartilhar via


CreateTextViewHostCallback Delegate

Definition

Callback used with IWpfDifferenceViewerFactoryService to create a text view host.

public delegate void CreateTextViewHostCallback(IDifferenceTextViewModel ^ textViewModel, ITextViewRoleSet ^ roles, IEditorOptions ^ options, [Runtime::InteropServices::Out] FrameworkElement ^ % visualElement, [Runtime::InteropServices::Out] IWpfTextViewHost ^ % textViewHost);
public delegate void CreateTextViewHostCallback(IDifferenceTextViewModel textViewModel, ITextViewRoleSet roles, IEditorOptions options, out FrameworkElement visualElement, out IWpfTextViewHost textViewHost);
type CreateTextViewHostCallback = delegate of IDifferenceTextViewModel * ITextViewRoleSet * IEditorOptions * FrameworkElement * IWpfTextViewHost -> unit
Public Delegate Sub CreateTextViewHostCallback(textViewModel As IDifferenceTextViewModel, roles As ITextViewRoleSet, options As IEditorOptions, ByRef visualElement As FrameworkElement, ByRef textViewHost As IWpfTextViewHost)

Parameters

textViewModel
IDifferenceTextViewModel

The text view model to use in creating the text view.

roles
ITextViewRoleSet

The roles specific to this view.

options
IEditorOptions

The options to use in creating the text view.

visualElement
FrameworkElement

The top-level visual element for this host.

textViewHost
IWpfTextViewHost

The created text view host.

Remarks

To get standard text view roles, the implementation of this method should concatenate the given roles with DefaultRoles.

In most cases, the visual element can just be the textViewHost's HostControl.

Applies to