다음을 통해 공유


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.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll)

Syntax

'Declaration
Protected Overridable ReadOnly Property BitmapResource As Integer
protected virtual int BitmapResource { get; }
protected:
virtual property int BitmapResource {
    int get ();
}
abstract BitmapResource : int with get 
override BitmapResource : int with get
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