IVsUIShell4.CreateToolbarTray Method

Attaches toolbars that are not contained inside a IVsWindowFrame.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)

Syntax

'Declaration
Function CreateToolbarTray ( _
    pCmdTarget As IOleCommandTarget, _
    <OutAttribute> ByRef ppToolbarTrayHost As IVsToolbarTrayHost _
) As Integer
int CreateToolbarTray(
    IOleCommandTarget pCmdTarget,
    out IVsToolbarTrayHost ppToolbarTrayHost
)
int CreateToolbarTray(
    [InAttribute] IOleCommandTarget^ pCmdTarget, 
    [OutAttribute] IVsToolbarTrayHost^% ppToolbarTrayHost
)
abstract CreateToolbarTray : 
        pCmdTarget:IOleCommandTarget * 
        ppToolbarTrayHost:IVsToolbarTrayHost byref -> int 
function CreateToolbarTray(
    pCmdTarget : IOleCommandTarget, 
    ppToolbarTrayHost : IVsToolbarTrayHost
) : int

Parameters

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method is similar to the SetupToolbar() alternatives, but allows you to attach toolbars that are not contained inside a IVsWindowFrame, such as dialogs. The IVsToolbarTrayHost instance it returns allows you to add toolbars and to retrieve the IVsUIElement that represents the UI element for the toolbar tray.

.NET Framework Security

See Also

Reference

IVsUIShell4 Interface

Microsoft.VisualStudio.Shell.Interop Namespace