共用方式為


ToolWindow.BitmapResource Property

When overriden in a derived class, gets the resource ID of the bitmap that appears next to the name of the tool window.

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

Syntax

'宣告
Protected Overridable ReadOnly Property BitmapResource As Integer
    Get
protected virtual int BitmapResource { get; }
protected:
virtual property int BitmapResource {
    int get ();
}
abstract BitmapResource : int
override BitmapResource : int
function get BitmapResource () : int

Property Value

Type: System.Int32
The resource ID of the bitmap.

Remarks

The bitmap appears only for tabbed windows. The bitmap's resource ID must match the bitmap's index, which you specify with the BitmapIndex property.

If -1 is returned, the tool window assumes no bitmap is assigned to it.

Examples

The following example retrieves the resource ID that is assigned to the bitmap that you want to use as an icon on the tab for your tool window.

protected override int BitmapResource
{
     get { return 104; }
}

.NET Framework Security

See Also

Reference

ToolWindow Class

Microsoft.VisualStudio.Modeling.Shell Namespace