CreateTextViewHostCallback Delegate

Definition

Callback used with IWpfDifferenceViewerFactoryService to create a text view host.

C++
public delegate void CreateTextViewHostCallback(IDifferenceTextViewModel ^ textViewModel, ITextViewRoleSet ^ roles, IEditorOptions ^ options, [Runtime::InteropServices::Out] FrameworkElement ^ % visualElement, [Runtime::InteropServices::Out] IWpfTextViewHost ^ % textViewHost);

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

Product Versies
Visual Studio SDK 2015, 2017, 2019, 2022