Welcome Guest Search | Active Topics | Sign In | Register

ImageZoom - programmatically adding ZoomPanelStyle Options
Nemo
Posted: Saturday, October 8, 2011 7:31:25 PM
Rank: Newbie
Groups: Member

Joined: 10/6/2011
Posts: 1
Hello,

I have a problem trying to add a ZoomPanelStyle to an ImageZoom control in code.
Creating the ImageZoom control in code is working perfect it is only the ZoomPanelStyle (the style from the enlarged picture) that is not applied to the control.

I have tried the following :

1) Setting the ZoomPanelStyle.CssText property in the code
tmpImage = New EO.Web.ImageZoom()
tmpImage.ZoomPanelStyle.CssText = "background-color: silver; padding: 5px"

2) Setting the ZoomPanelStyle.InlineStyle items separately
tmpImage = New EO.Web.ImageZoom()
tmpImage.ZoomPanelStyle.InlineStyle.Item("background-color") = "silver"
tmpImage.ZoomPanelStyle.InlineStyle.Item("padding") = "5px"

3) Create an EO.Web.ElementStyle object and pass it on to the ZoomPanelStyle property
tmpImage = New EO.Web.ImageZoom()
tmpStyle = New EO.Web.ElementStyle
tmpStyle.BackColor = Drawing.Color.Silver
tmpStyle.Paddings.All = 5
tmpImage.ZoomPanelStyle = tmpStyle

None of the 3 previous methods gives me a silver backcolor or a 5 pixel padding on the enlarged picture.

Can you point me in the right direction on how to implement a ZoomPanelStyle from an ImageZoom control in code ?

Thanks in advance

Jerry

Code: Visual Basic.NET
Code: HTML/ASPX
eo_support
Posted: Sunday, October 9, 2011 6:15:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Either one your methods should work. However you must set the style property early enough for it to take effect. As a test, you can try your code in Page_Load and you should see them working. Once it passes PreRender stage, you can no longer set styles. You will also want to try your code in a separate test page just in case somewhere else in your code has reset the styles.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.