Jump to content
We've recently updated our Privacy Statement, available here. ×

Resizing a custom value renderer image in a tooltip

Matthew Smith

Recommended Posts

I created a custom value renderer in a C# extension todisplay images obtained from API calls. One of the uses of this custom value render is to display these images in a tooltip, similar to "Image For URL".

In my code, in the "RenderCore()" function, I recieve the image from a stream and set it using "result.SetImage(image)". Here's anexample:

protected override void RenderCore(

ValueRendererSettings rendererSettings, ValueRendererArgs renderingArgs, ValueRendererResult result)


string value = renderingArgs.DataValue.ValidValue.ToString();

Stream stream = DownloadApiImage(value); //Custom function

Image image = Image.FromStream(stream);


result.SetImage(image); //Cannot figure out how to resize this

}The image displays correctly, but I am unable to resize it using the "Size" slider in the "Edit Tooltip Value" window. It just displays the image in its full size. Sometimes, these images can be quite large and cover majority of the screen, which can be qutie annoying if they aren't sized down. How can I make the "Size" slider affect the custom value renderer image in a tooltip

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...