Freigeben über


CreateTextViewHostCallback Delegate

Callback used with IWpfDifferenceViewerFactoryService to create a text view host.

Namespace:  Microsoft.VisualStudio.Text.Differencing
Assembly:  Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)

Syntax

'Declaration
Public Delegate Sub CreateTextViewHostCallback ( _
    textViewModel As IDifferenceTextViewModel, _
    roles As ITextViewRoleSet, _
    options As IEditorOptions, _
    <OutAttribute> ByRef visualElement As FrameworkElement, _
    <OutAttribute> ByRef textViewHost As IWpfTextViewHost _
)
public delegate void CreateTextViewHostCallback(
    IDifferenceTextViewModel textViewModel,
    ITextViewRoleSet roles,
    IEditorOptions options,
    out FrameworkElement visualElement,
    out IWpfTextViewHost textViewHost
)
public delegate void CreateTextViewHostCallback(
    IDifferenceTextViewModel^ textViewModel, 
    ITextViewRoleSet^ roles, 
    IEditorOptions^ options, 
    [OutAttribute] FrameworkElement^% visualElement, 
    [OutAttribute] IWpfTextViewHost^% textViewHost
)
type CreateTextViewHostCallback = 
    delegate of  
        textViewModel:IDifferenceTextViewModel * 
        roles:ITextViewRoleSet * 
        options:IEditorOptions * 
        visualElement:FrameworkElement byref * 
        textViewHost:IWpfTextViewHost byref -> unit
JScript does not support delegates.

Parameters

  • visualElement
    Type: FrameworkElement%

Remarks

Use the following parameters:

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

roles: The roles specific to this view.

options:The options to use in creating the text view.

visualElement: The top-level visual element for this host.

textViewHost: The created text view host.

To get standard text view roles, the implementation of this method should concatenate the given roleswith=DefaultRoles. In most cases the visual element can just be the textViewHost’s P:Microsoft.VisualStudio.Text.Editor.IWpfTextViewHost.HostControl.

See Also

Reference

Microsoft.VisualStudio.Text.Differencing Namespace