I can define a designer function with a return type LlParamType.Drawing.
However, If I return a Bitmap-Object the designer just prints out “System.Drawing.Bitmap”. Please allow Designer Functions that return an image.var
function = new DesignerFunction() {
FunctionName = “GetBitmap”, Description =
“Erwartet als Parameter den Namen einer Datei und liefert ein Bitmap Objekt”,
GroupName = “Sonstiges”, Visible = true, MinimalParameters = 1, MaximumParameters = 1,
Parameter1 = new DesignerFunctionParameter() {
Description = “Name der Datei”, Type = LlParamType.String
}, ResultType = LlParamType.Drawing,
};function.EvaluateFunction += (_sender, _e) = > {
var fileName = (string) _e.Parameter1;
_e.ResultValue = new Bitmap(fileName);
_e.ResultType = LlParamType.Drawing;
}