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: I won't be adding it back: * ImageLoad event exposes the ability to provide image externally * ImageLoad event provides more functionallity: conditional override, partial image source, etc. * Supporting two methods is an overhead * Direct access to WinForms Image object won't work in v1.5 * Reflection is slow. * Providing the reference assemblies for reflection to work sucks. * In general it feels like a hack and not a valid extensibility API and event handling is not a significant overhead. **In your case I would:** 1. Extent HtmlToolTip with my own class: MyHtmlToolTip : HtmlToolTip {... 2. Subscribe to ImageLoad event in ctor: _htmlContainer.ImageLoad += OnImageLoad; 3. Return the required image in OnImageLoad by direct resource access by name (or reflection if you like) then you won't have to change the hundreds of tooltip (really?), just change the class. and you don't need to change the library code.
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: I won't be adding it back: * ImageLoad event exposes the ability to provide image externally * ImageLoad event provides more functionallity: conditional override, partial image source, etc. * Supporting two methods is an overhead * Direct access to WinForms Image object won't work in v1.5 * Reflection is slow. * Providing the reference assemblies for reflection to work sucks. * In general it feels like a hack and not a valid extensibility API and event handling is not a significant overhead. **In your case I would:** 1. Extent HtmlToolTip with my own class: MyHtmlToolTip : HtmlToolTip {... 2. Subscribe to ImageLoad event in ctor: _htmlContainer.ImageLoad += OnImageLoad; 3. Return the required image in OnImageLoad by direct resource access by name (or reflection if you like) then you won't have to change the hundreds of tooltip (really?), just change the class. and you don't need to change the library code.