共用方式為


InfoBarHostControl Class

Definition

Creates a control that can be used to host InfoBars. The host control observes events on each InfoBar to remove closed info bars from its collection.

public ref class InfoBarHostControl sealed : System::Windows::Controls::Control, Microsoft::Internal::VisualStudio::Shell::Interop::IVsInfoBarHostPrivate, Microsoft::VisualStudio::Shell::Interop::IVsInfoBarUIEvents
public ref class InfoBarHostControl sealed : System::Windows::Controls::Control, Microsoft::Internal::VisualStudio::Shell::Interop::IVsInfoBarHostPrivate, Microsoft::VisualStudio::Shell::Interop::IVsInfoBarHost, Microsoft::VisualStudio::Shell::Interop::IVsInfoBarUIEvents
public sealed class InfoBarHostControl : System.Windows.Controls.Control, Microsoft.Internal.VisualStudio.Shell.Interop.IVsInfoBarHostPrivate, Microsoft.VisualStudio.Shell.Interop.IVsInfoBarUIEvents
type InfoBarHostControl = class
    inherit Control
    interface IVsInfoBarHost
    interface IVsInfoBarUIEvents
    interface IVsInfoBarHostPrivate
Public NotInheritable Class InfoBarHostControl
Inherits Control
Implements IVsInfoBarHostPrivate, IVsInfoBarUIEvents
Inheritance
InfoBarHostControl
Implements
Microsoft.Internal.VisualStudio.Shell.Interop.IVsInfoBarHostPrivate IVsInfoBarHost IVsInfoBarUIEvents

Constructors

InfoBarHostControl()

Initialize an InfoBar host.

Properties

HostWindowIdentifier

Identifies the window that the infobar is hosted in. This is used only for telemetry purposes.

InfoBars

Gets a read-only list of InfoBar UI elements.

Methods

AddInfoBar(IVsUIElement)

Add an InfoBar UI element to this InfoBar host.

RemoveInfoBar(IVsUIElement)

Remove an InfoBar UI element from this InfoBar host.

Explicit Interface Implementations

IVsInfoBarHostPrivate.GetInfoBar(Int32)
IVsInfoBarHostPrivate.InfoBarCount
IVsInfoBarUIEvents.OnActionItemClicked(IVsInfoBarUIElement, IVsInfoBarActionItem)

Raised when the InfoBar’s action item is clicked.

IVsInfoBarUIEvents.OnClosed(IVsInfoBarUIElement)

Raised when the InfoBar is closed.

Applies to