I'm using the 12.1 controls with .net 4.
I've set the Height of the WebImageViewer control to 100 pixels, but if I add an image that doesn't fit in the control, the control will grow to fit the image on some browsers (Chrome, Firefox, Safari). Is there any way to make it keep the controls Height without resizing all of the images that I am feeding it?
Thanks for you help.
Hi LukeIsCool,
Thank you for sharing your solution with the community.
I have asked our engineering staff to examine this further so as to include a fix for this behavior in a future release. To ensure that the matter will receive attention I have logged it in our internal system with a development id of 111586. The next step would be for a developer to review the scenario and offer a resolution.
A support case has been created for you regarding this matter: CAS-91348-V11TJC. I will leave this case open and update you with any new information after the review. You can also continue to send updates to this case at any time.
You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Please let me know if you need more information.
I found some code that lead me down the path to the answer that I was looking for.
I set an event handler up for the Initialize event of the WebImageViewer and called it WebImageViewer1_Initialize. The following javascript function sets the image height to 90 pixels.
function WebImageViewer1_Initialize(sender, eventArgs) { var itemsCollection = sender.get_items(); var itemsCount = itemsCollection.get_length(); for (var i = 0; i < itemsCount; i++) { var imageItem = itemsCollection.getItem(i); imageItem.get_element().style.height = "90px"; } }