Hello!
Please add back support of v 1.0 src="property:" and src="method:" image sources. There are certain instances when it is very convenient to use this approach:
- Handling events manually is extra overhead
- Supplying the base-64 value inline is also an overhead if you have to do it in many different places
- Loading from file/web for small icons is not convenient either
- Most icons/images are stored as resources and used as such in other controls. So, when you use property: to refer to such an image resource, it's very easy to do and you don;t have to change anything or write new code.
- Sometimes, although certainly an exotic use case, you may actually rely on a property/method to provide a dynamic image every time.
In our case, I had to manually add back this functionality by adding old code back to ImageHandler. It was trivial, so I think it would not hurt if such support would remain.
We use HTML Renderer in our custom tooltip control. And because we had hundreds of tooltip texts "baked-in" and scattered all over the place, changing them all would be very time consuming, so we had to add back support for the old image source format manually.
Comments: Using HTMLContainer is the recommended approach for custom control, prefer using it to HtmlRender static methods. HTMLContainer is a low level construct that have switches to control its behavior, see AvoidAsyncImagesLoading and AvoidImagesLateLoading. Regardless you can pass imageLoad delegate to HtmlRender.Render method: ``` public static SizeF Render(Graphics g, string html, float left = 0, float top = 0, float maxWidth = 0, CssData cssData = null, EventHandler<HtmlStylesheetLoadEventArgs> stylesheetLoad = null, EventHandler<HtmlImageLoadEventArgs> imageLoad = null) ```
Please add back support of v 1.0 src="property:" and src="method:" image sources. There are certain instances when it is very convenient to use this approach:
- Handling events manually is extra overhead
- Supplying the base-64 value inline is also an overhead if you have to do it in many different places
- Loading from file/web for small icons is not convenient either
- Most icons/images are stored as resources and used as such in other controls. So, when you use property: to refer to such an image resource, it's very easy to do and you don;t have to change anything or write new code.
- Sometimes, although certainly an exotic use case, you may actually rely on a property/method to provide a dynamic image every time.
In our case, I had to manually add back this functionality by adding old code back to ImageHandler. It was trivial, so I think it would not hurt if such support would remain.
We use HTML Renderer in our custom tooltip control. And because we had hundreds of tooltip texts "baked-in" and scattered all over the place, changing them all would be very time consuming, so we had to add back support for the old image source format manually.
Comments: Using HTMLContainer is the recommended approach for custom control, prefer using it to HtmlRender static methods. HTMLContainer is a low level construct that have switches to control its behavior, see AvoidAsyncImagesLoading and AvoidImagesLateLoading. Regardless you can pass imageLoad delegate to HtmlRender.Render method: ``` public static SizeF Render(Graphics g, string html, float left = 0, float top = 0, float maxWidth = 0, CssData cssData = null, EventHandler<HtmlStylesheetLoadEventArgs> stylesheetLoad = null, EventHandler<HtmlImageLoadEventArgs> imageLoad = null) ```