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

Odd borders and sizing problems

7 Answers 117 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
mark leavesley
Top achievements
Rank 1
mark leavesley asked on 27 Aug 2010, 12:55 PM
Hello,

Neat control in the demos, but when I come to use it I have some problems. The carousel is inside a splitter panel that is 50% tall and 25% wide of the form.

1) I am loading images at runtime from the sample pictures folder (C:\Users\Public\Pictures\Sample Pictures), these are much larger than the control. I had expected there to be a means to say autosize the image but the autosize property on the carousel item does not appear to do anything.

2) The images are not centered (see attached) nor can I figure out where the borders are coming from.

3) I cannot move the navigation buttons, I want them as they are but half way up (I'm surprised this is not a provided setting).

4) The MSDN documentation is awful, look at the description of the easing types for example: ms-help://MS.VSCC.v90/MS.VSIPCC.v90/telerik.winforms.2010.2/telerik.winforms/Telerik.WinControls~Telerik.WinControls.RadEasingType.html

On re-sizing the splits it seems that image is probably the right size but the borders are messing things up.

All I am after is a slide show. maybe this is not the appropriate control?

Here is my code:
Dim objl_TELERIK_CAROUSEL As New Telerik.WinControls.UI.RadCarousel
ctll_PANEL_3.Controls.Add(objl_TELERIK_CAROUSEL)
objl_TELERIK_CAROUSEL.Dock = DockStyle.Fill
objl_TELERIK_CAROUSEL.Name = ctll_PANEL_3.Name & "_TELERIK_CAROUSEL"
objl_TELERIK_CAROUSEL.AnimationsToApply = Telerik.WinControls.UI.Animations.None
objl_TELERIK_CAROUSEL.AnimationDelay = 0
'objl_TELERIK_CAROUSEL.AnimationFrames = 0
objl_TELERIK_CAROUSEL.EasingType = Telerik.WinControls.RadEasingType.Default
objl_TELERIK_CAROUSEL.ItemReflectionPercentage = 0
objl_TELERIK_CAROUSEL.AutoScroll = False
objl_TELERIK_CAROUSEL.ButtonNext.Location = New System.Drawing.Point(objl_TELERIK_CAROUSEL.ButtonNext.Bounds.X, CInt(objl_TELERIK_CAROUSEL.Height / 2))
 
For Each strl_FILE As String In My.Computer.FileSystem.GetFiles("C:\Users\Public\Pictures\Sample Pictures")
  If strl_FILE.EndsWith(".jpg") Then
    Dim carouselItem As Telerik.WinControls.UI.RadButtonElement = New Telerik.WinControls.UI.RadButtonElement
    carouselItem.Image = New Bitmap(New Bitmap(strl_FILE), objl_TELERIK_CAROUSEL.Size.Width, objl_TELERIK_CAROUSEL.Size.Height)
    carouselItem.Alignment = ContentAlignment.TopLeft
    carouselItem.DisplayStyle = Telerik.WinControls.DisplayStyle.Image
    carouselItem.FitToSizeMode = Telerik.WinControls.RadFitToSizeMode.FitToParentBounds
    carouselItem.ImageAlignment = ContentAlignment.TopLeft
    carouselItem.AutoSize = True
    carouselItem.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.Auto
    objl_TELERIK_CAROUSEL.Items.Add(carouselItem)
  End If
Next


Regards,
Mark Leavesley

7 Answers, 1 is accepted

Sort by
0
mark leavesley
Top achievements
Rank 1
answered on 27 Aug 2010, 02:29 PM
Here's another problem I get, see attachment. The top 10-15% of the new photo is overlayed with the old photo. If I click the penguin his head appears!
0
Peter
Telerik team
answered on 01 Sep 2010, 04:28 PM
Hi mark leavesley,

Thank you for the provided information and source code.

RadCarousel is not designed to manage big and overlapping images. AutoSize property has a different meaning in our TPF, it does not scale the images into the control. So, I would suggest that you scale the images manually and make them smaller, and if you want to center them, please adjust the carousel path accordingly.

Please note that the exact position of the images on the carousel path cannot be manipulated. The position of the Navigation buttons cannot be set as well, because they are a part of the CarouselLayout. The Navigation buttons are controlled by the following properties:

NavigationButtonsOffset - Represents the navigation buttons' offset from the carousel border.
NavigationButtonsPosition - Represents buttons' position on the screen - top, bottom, left, right.

If you have additional questions, feel free to contact us.

Greetings,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
mark leavesley
Top achievements
Rank 1
answered on 02 Sep 2010, 03:45 PM
Thanks for that. I tried the Rotator instead and had similar problems, I guess they are have similar internals. I am surprised I cannot simply display a series of images and not have to be concerned about whether they will fit or not, what happens when form changes size? Do I have to reload all the images at the new size?

The rotator is probably more what I am after, I can float my own navigation buttons over it. Can it scroll horizontally rather than vertically? It's a most unusual default behaviour.


Regards,
Mark Leavesley
0
Peter
Telerik team
answered on 07 Sep 2010, 11:52 AM
Hi mark leavesley,

Thanks for getting back to me.

Your information was helpful. You can manage the RadRotator scroll positions using the LocationAnimation property. This property controls the direction of movement when an item is animated. When LocationAnimation.Width property value is positive, this causes the transition between items to move left, and when is negative the items move right. When LocationAnimation.Height property value is positive, it causes the transition between items to move up and when negative - the items move down.

For more information about RadRotator please refer to our help.

Don't hesitate to contact us if you have other questions.


All the best,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
mark leavesley
Top achievements
Rank 1
answered on 07 Sep 2010, 12:44 PM
Hello,

I am unable to set either of those properties, I get the error:

'Expression is a value and therefore cannot be the target of an assignment'. I'll have a look at the help!


Regards,
Mark Leavesley
0
mark leavesley
Top achievements
Rank 1
answered on 07 Sep 2010, 12:49 PM
The help was not helpful, it merely stated your text. I found an example in the forum however which shows how to set it. Not at all intuitive, why would I want to use a size object to control which way my animation flows???
0
Peter
Telerik team
answered on 09 Sep 2010, 05:38 PM
Hello mark leavesley,

Thanks for writing back.

You can read more about this error on the MSDN site. If the statement assigns a value to an expression, replace the expression with a single writable variable, property, or array element.

You are completely right about the property not being intuitive - we will introduce a new property with enum in a future release. The current property will keep working.

Please, excuse us for the inconvenience. Don't hesitate to contact us if you have other questions.

Sincerely yours,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Carousel
Asked by
mark leavesley
Top achievements
Rank 1
Answers by
mark leavesley
Top achievements
Rank 1
Peter
Telerik team
Share this question
or