DtsPipelineComponentAttribute.IconResource 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置工具箱中用于表示组件的图标。
public:
property System::String ^ IconResource { System::String ^ get(); void set(System::String ^ value); };
public string IconResource { get; set; }
member this.IconResource : string with get, set
Public Property IconResource As String
属性值
一个字符串,用于标识用于表示工具箱中组件的图标资源。
示例
以下示例展示了一个组件类,它提供图标资源。
using System;
using Microsoft.SqlServer.Dts.Pipeline;
namespace DtsDocumentation
{
[DtsPipelineComponent(DisplayName="MyComponent",IconResource="DtsDocumentation.MyComponentIcon.ico")]
public class MyComponent : PipelineComponent
{
}
}
Imports System
Imports Microsoft.SqlServer.Dts.Pipeline
Namespace DtsDocumentation
<DtsPipelineComponent(DisplayName="MyComponent", IconResource="DtsDocumentation.MyComponentIcon.ico")> _
Public Class MyComponent
Inherits PipelineComponent
End Class
End Namespace
注解
该属性控制在组件加入 data flow 时,在 数据流 工具箱和 data flow 标签页设计表面上显示的图标。
数据流工具箱使用16x16、16色图像类型,而data flow标签页的设计表面使用32x32、16色图像类型。 这两种都是使用 Microsoft Visual Studio 创建图标的默认图像类型。
标识图标资源的字符串格式为虚线符号,由汇编的根命名空间名称、句点,然后图标文件名称组成。
要在 Visual Studio 中将图标文件嵌入为资源,创建新图标,然后在 Visual Studio 属性窗口中将图标文件的构建动作属性设置为嵌入式资源。