ActivityDesigner.Image Property

Definition

Gets or sets the Image associated with the designer.

C#
public virtual System.Drawing.Image Image { get; protected set; }

Property Value

The Image associated with the designer.

Examples

The following example demonstrates loading a Bitmap object from an embedded resource. In this case, the ToolboxImage is the same Image that is used when the base ActivityDesigner class draws the custom ActivityDesigner.

C#
protected override void Initialize(Activity activity)
{
    base.Initialize(activity);
    Bitmap bmp = Resources.ToolboxImage;
    bmp.MakeTransparent();
    this.Image = bmp;
}

Remarks

The Image property is set to the Image to display. You can do this at design time or at run time.

Applies to

產品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1