Bitmap control in SOLIDWORKS property Manager Page

Edit ArticleEdit Article

Bitmap control
Bitmap control

Static bitmap will be created in the property manager page for the properties of Image type or other types assignable from this type, e.g. Bitmap

using CodeStack.SwEx.PMPage.Attributes;
using CodeStack.SwEx.Properties;
using System.Drawing;

public class BitmapDataModel
    public Image Bitmap { get; set; } = Resources.BitmapSample;


Bitmap size

Default size of the bitmap is 18x18 pixels, however this could be overridden using the BitmapOptionsAttribute by providing width and height values in the constructor parameters:

[BitmapOptions(48, 48)]
public Image BitmapLarge { get; set; } = Resources.BitmapSample;

Due to SOLIDWORKS API limitation bitmap cannot be changed as dynamic value after property manager page is displayed. Assign the image in the data model class constructor or as a default value of the property.

Product of Xarial Product of Xarial