This is a migrated thread and some comments may be shown as answers.

Having problem with image displaying correctly

1 Answer 88 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Brett
Top achievements
Rank 1
Brett asked on 22 Feb 2011, 01:22 PM
I am having a problem with an image displaying correctly in my RadRotator.  It appears that the image is zoomed in and far too large.  Below is my code for the RadRotator, now what could possibly be the problem?:

 

 

 

<telerik:RadRotator ID="RadRotator1" runat="server" FrameDuration="4000"

 

 

 

Width="100%" ItemWidth="100%" Height="400px" ItemHeight="400px" ScrollDirection="Left">

 

 

 

<Items>

 

 

 

<telerik:RadRotatorItem ID="item1" runat="server" >

 

 

 

<ItemTemplate>

 

 

 

<asp:Image ID="Image1" runat="server" Width="100%" ImageUrl="~/images/managedservices.jpg" />

 

 

 

</ItemTemplate>

 

 

 

</telerik:RadRotatorItem>

 

 

 

<telerik:RadRotatorItem ID="item2" runat="server" >

 

 

 

<ItemTemplate>

 

 

 

<asp:Image ID="Image2" runat="server" Width="100%" ImageUrl="~/images/ANTON.jpg" />

 

 

 

</ItemTemplate>

 

 

 

</telerik:RadRotatorItem>

 

 

 

<telerik:RadRotatorItem ID="item3" runat="server" >

 

 

 

<ItemTemplate>

 

 

 

<asp:Image ID="Image3" runat="server" Width="100%" ImageUrl="~/images/BOTTM.jpg" />

 

 

 

</ItemTemplate>

 

 

 

</telerik:RadRotatorItem>

 

 

 

</Items>

 

 

 

</telerik:RadRotator>

 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 Feb 2011, 06:51 PM
Hi Brett,

Setting the image width and item width to 100% makes the image fill up the whole viewport (that is zoom in). Especially if the aspect ratio of the image and the RadRotator are not the same you will experience incorrect display.

The Width and ItemWidth properties should be set in pixels and should correspond to the actual size of the images. The images, on the other hand, should be edited to such a size and aspect ratio so that they fit correctly in the viewport so that declaring a width property for them is not necessary. Please, see the How to configure RadRotator help article for a more visual explanation.


Best wishes,
Marin
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Rotator
Asked by
Brett
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or