I am trying to dynamically set the Style.Color of a text box with a custom function but keep getting errors back

0 Answers 4 Views
.NET Framework Binding Styling
JOHN
Top achievements
Rank 1
JOHN asked on 19 Nov 2025, 12:03 PM

I have a 2 custom functions but neither seem to work.

I have an Action on a text box control to set Style.Color with these expressions (tried both)

= EIT.EITNumberColourHex( Fields.pnFeesTotal )

I have also tried this

= EIT.EITNumberColour( Fields.pnFeesTotal )

But I get errors saying "Cannot find overload of function ..."

My functions headers are

        [Function(Category = "EITFunctions", Namespace = "EIT", Name = "EITNumberColour", Description = "Returns number colours red,blue or black based on parameters", IsVisible = true)]
        public static System.Drawing.Color EITNumberColour(decimal number, bool useColour = true)

 

        [Function(Category = "EITFunctions", Namespace = "EIT", Name = "EITNumberColourHex", Description = "Returns number colours red,blue or black based on parameters in hex", IsVisible = true)]
        public static string EITNumberColourHex(decimal number, bool useColour = true)
        {

 

Can you anyone advise what am doing incorrectly?

Thanks

John

No answers yet. Maybe you can help?

Tags
.NET Framework Binding Styling
Asked by
JOHN
Top achievements
Rank 1
Share this question
or