InfoBarHostControl 类

定义

可用于承载信息栏的控件。 宿主控件观察每个信息栏上的事件,以删除其集合中的已关闭信息栏。

public ref class InfoBarHostControl sealed : System::Windows::Controls::Control, Microsoft::Internal::VisualStudio::Shell::Interop::IVsInfoBarHostPrivate, 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
继承
InfoBarHostControl
实现
Microsoft.Internal.VisualStudio.Shell.Interop.IVsInfoBarHostPrivate IVsInfoBarHost IVsInfoBarUIEvents

构造函数

InfoBarHostControl()

创建 InfoBarHostControl 的新实例。

属性

HostWindowIdentifier

标识信息栏承载的窗口。 这仅用于遥测目的。

InfoBars

获取信息栏 UI 元素的只读列表。

方法

AddInfoBar(IVsUIElement)

向此信息栏宿主添加信息栏 UI 元素。

RemoveInfoBar(IVsUIElement)

从此信息栏主机中删除信息栏 UI 元素。

显式接口实现

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

单击信息栏的操作项时引发。

IVsInfoBarUIEvents.OnClosed(IVsInfoBarUIElement)

当信息栏关闭时引发。

适用于