Welcome Guest Search | Active Topics | Sign In | Register

Menu Icons Height and Width Options
Andre(PortalProduto)
Posted: Saturday, August 1, 2009 10:27:53 PM
Rank: Newbie
Groups: Member

Joined: 5/13/2009
Posts: 9
Hi,

I am trying to create a binding for LeftIcon-Height, Width, RightIcon-Height and Width, etc. But the images are displayed the same as the original size.
My code is:

Dim bindingName As New EO.Web.DataBinding()
bindingName.DataField = "title"
bindingName.Property = "Text-Html"

Dim bindingId As New EO.Web.DataBinding()
bindingId.DataField = "item_id"
bindingId.Property = "ItemID"

Dim bindingLeftIcon As New EO.Web.DataBinding()
bindingLeftIcon.DataField = "left_icon"
bindingLeftIcon.Property = "LeftIcon-Url"

Dim bindingLeftIconHeight As New EO.Web.DataBinding()
bindingLeftIconHeight.DataField = "left_icon_height"
bindingLeftIconHeight.Property = "LeftIcon-Height"

Dim bindingLeftIconWidth As New EO.Web.DataBinding()
bindingLeftIconWidth.DataField = "left_icon_width"
bindingLeftIconWidth.Property = "LeftIcon-Width"

Dim bindingRightIcon As New EO.Web.DataBinding()
bindingRightIcon.DataField = "right_icon"
bindingRightIcon.Property = "RightIcon-Url"

Dim bindingRightIconHeight As New EO.Web.DataBinding()
bindingRightIconHeight.DataField = "right_icon_height"
bindingRightIconHeight.Property = "RightIcon-Height"

Dim bindingRightIconWidth As New EO.Web.DataBinding()
bindingRightIconWidth.DataField = "right_icon_width"
bindingRightIconWidth.Property = "RightIcon-Width"

Menu1.Bindings.Add(bindingId)
Menu1.Bindings.Add(bindingName)

Menu1.Bindings.Add(bindingLeftIconHeight)
Menu1.Bindings.Add(bindingLeftIconWidth)
Menu1.Bindings.Add(bindingRightIconHeight)
Menu1.Bindings.Add(bindingRightIconWidth)

Menu1.Bindings.Add(bindingLeftIcon)
Menu1.Bindings.Add(bindingRightIcon)

The DataField is correct for those cases. Only the binding for LeftIcon-Url and ItemId works. The binding to Icon sizes are ignored.

I tested then with:

Protected Sub Menu1_ItemDataBound(ByVal sender As Object, ByVal e As EO.Web.NavigationItemEventArgs)
Dim height As Long = e.MenuItem.LeftIcon.Height
Dim width As Long = e.MenuItem.LeftIcon.Width
e.MenuItem.NavigateUrl = String.Format("menu_item.aspx?item_id={0}", e.MenuItem.ItemID)
e.MenuItem.LeftIcon.Height = 8
e.MenuItem.LeftIcon.Width = 8
End Sub

Again, only the NavigateUrl is considered, even setting LeftIcon.Height and Width "manually" the icons size remain "large". Oh, and about the height and width variables declared there, they have always the same value: -2147483648

Could you help me please?

Thank you.
eo_support
Posted: Sunday, August 2, 2009 3:46:54 PM
Rank: Administration
Groups: Administration

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

We have confirmed that Height and Width are not working in the current release. Data binding to Width and Height are not supported either. We will look into it and see what we can do. In the mean time you may wish to resize the image before passing it to the menu.

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.