Copyright © 2003-2024 MultiMedia Soft

PictureCustom property

Previous pageReturn to chapter overviewNext page

Type

[Visual Basic]

Public Overridable Property PictureCustom As String

 

[C#]

public virtual string PictureCustom {get; set;}

 

[C++]

public: __property virtual String* get_PictureCustom();

public: __property virtual void set_PictureCustom(String*);

 

 

Remarks

The filename of the picture file used as a mask to render the shape of the button.

Supported bitmap fornats are BMP, GIF, or PNG.

Applies only when the Shape property is set to Shapes.Custom.

The color of the picture left top pixel will be considered "transparent" so every pixel containing this color will not be considered as part of the mask.

The example below shows how a black and white picture can be used as a mask for a button that will have the same shape of the white part of the picture.

3dcm_i000049

In order to change this setting at Design-time take a look to the How to change the control appearance section.

NOTE 1: The mask picture can have more than one region.

NOTE 2: You can use also color pictures and not only black and white pictures: this is very useful for implementing custom 3D rendering of the control surface.

 

 

Notes

Setting a picture for button custom shape at design time will not require to redistribute the picture file because its binary will be stored inside the final application code in a compressed format (the redistribution is required only when there is the need of changing and restoring the button custom shape at runtime).