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
cs
using System.Drawing;
using Xarial.XCad.Documentation.Properties;
using Xarial.XCad.UI.PropertyPage.Attributes;
public class BitmapDataModel
{
public Image Bitmap { get; set; } = Resources.BitmapSample;
cs
}
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:
cs
[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.