Hi.
I'm trying to create a TabControl with a movment-change affect between tabs.
To do this, I need to do 2 things:
1. Can I put UserControl as the Carousel element?
2. Can I control the movment path of the carousel? (I just want a horizontal movment, and not circular)
Thanks.
I'm trying to create a TabControl with a movment-change affect between tabs.
To do this, I need to do 2 things:
1. Can I put UserControl as the Carousel element?
2. Can I control the movment path of the carousel? (I just want a horizontal movment, and not circular)
Thanks.
10 Answers, 1 is accepted
0
Hello Eli,
Thank you for your interest in RadCarousel. We hope you find it a useful addition to our product.
1) You should add any control in the carousel item using the following code:
DateTimePicker ctl = new DateTimePicker();
ctl.AutoSize = false;//switch off MS autolayout functionality
ctl.MinimumSize = new Size(110,20);
RadHostItem hostItem = new RadHostItem( ctl );
this.radCarousel1.Items.Add(hostItem);
2) For horizontal moving, you should use the Carousel Bezier path with the same Y coordinates.
For example:
carouselBezierPath1.AllowRelativePath = false;
carouselBezierPath1.CtrlPoint1 = new Telerik.WinControls.UI.Point3D(377, 140, 0);
carouselBezierPath1.CtrlPoint2 = new Telerik.WinControls.UI.Point3D(93, 140, 0);
carouselBezierPath1.FirstPoint = new Telerik.WinControls.UI.Point3D(25, 140, 0);
carouselBezierPath1.LastPoint = new Telerik.WinControls.UI.Point3D(435, 140, 0);
carouselBezierPath1.ZScale = 500;
this.radCarousel1.CarouselPath = carouselBezierPath1;
this.radCarousel1.EnableLooping = true;
If you have additional questions, do not hesitate to contact me.
Kind regards,
Peter
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for your interest in RadCarousel. We hope you find it a useful addition to our product.
1) You should add any control in the carousel item using the following code:
DateTimePicker ctl = new DateTimePicker();
ctl.AutoSize = false;//switch off MS autolayout functionality
ctl.MinimumSize = new Size(110,20);
RadHostItem hostItem = new RadHostItem( ctl );
this.radCarousel1.Items.Add(hostItem);
2) For horizontal moving, you should use the Carousel Bezier path with the same Y coordinates.
For example:
carouselBezierPath1.AllowRelativePath = false;
carouselBezierPath1.CtrlPoint1 = new Telerik.WinControls.UI.Point3D(377, 140, 0);
carouselBezierPath1.CtrlPoint2 = new Telerik.WinControls.UI.Point3D(93, 140, 0);
carouselBezierPath1.FirstPoint = new Telerik.WinControls.UI.Point3D(25, 140, 0);
carouselBezierPath1.LastPoint = new Telerik.WinControls.UI.Point3D(435, 140, 0);
carouselBezierPath1.ZScale = 500;
this.radCarousel1.CarouselPath = carouselBezierPath1;
this.radCarousel1.EnableLooping = true;
If you have additional questions, do not hesitate to contact me.
Kind regards,
Peter
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Eli
Top achievements
Rank 1
answered on 26 May 2008, 01:36 PM
Thanks, I'll give it a try.
Great control!
Great control!
0
Jon
Top achievements
Rank 1
answered on 23 Jun 2008, 03:04 PM
Hi..
How do you assign the Text property to the carousel item, once you add the control to the RadHostItem?
thanks
How do you assign the Text property to the carousel item, once you add the control to the RadHostItem?
thanks
0
Hello Jon Elster,
Thank you for writing.
Could clarify what you mean by "Text property to the carousel item". Usually, the Text property can be assigned with the code below:
RadButtonElement carouselItem = new RadButtonElement();
carouselItem.ImageAlignment = ContentAlignment.MiddleCenter;
carouselItem.TextAlignment = ContentAlignment.MiddleCenter;
carouselItem.DisplayStyle = DisplayStyle.Text;//or ImageAndText
carouselItem.TextImageRelation = TextImageRelation.ImageAboveText;
carouselItem.ShowBorder = false;
carouselItem.Text = "First Item";
this.radCarousel1.Items.Add(carouselItem);
Let me know if I can help you further.
All the best,
Peter
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for writing.
Could clarify what you mean by "Text property to the carousel item". Usually, the Text property can be assigned with the code below:
RadButtonElement carouselItem = new RadButtonElement();
carouselItem.ImageAlignment = ContentAlignment.MiddleCenter;
carouselItem.TextAlignment = ContentAlignment.MiddleCenter;
carouselItem.DisplayStyle = DisplayStyle.Text;//or ImageAndText
carouselItem.TextImageRelation = TextImageRelation.ImageAboveText;
carouselItem.ShowBorder = false;
carouselItem.Text = "First Item";
this.radCarousel1.Items.Add(carouselItem);
Let me know if I can help you further.
All the best,
Peter
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Jon
Top achievements
Rank 1
answered on 24 Jun 2008, 11:34 AM
Yes.. that's what I needed... thanks..
0
petr
Top achievements
Rank 1
answered on 09 Feb 2010, 10:04 AM
Hi
I have one more question reagarding the discussion above. Features you are describing works great except one small problem Im facing - not able to set up the font properties (size, family, bold and so on).
Here is the piece of my code:
I have one more question reagarding the discussion above. Features you are describing works great except one small problem Im facing - not able to set up the font properties (size, family, bold and so on).
Here is the piece of my code:
RadImageButtonElement ribe = new RadImageButtonElement();
ribe.Image =
Image.FromFile("C:\\Projects\\image.jpg");
ribe.DisplayStyle =
DisplayStyle.ImageAndText;
ribe.TextImageRelation =
TextImageRelation.TextAboveImage;
ribe.ShowBorder =
true;
ribe.Text = produkt.ProductName;
ribe.TextAlignment =
ContentAlignment.MiddleCenter;
//ribe.Font.Size = 15;
Products_radCarousel.Items.Add(ribe);
Commented green line didn't works for me - as this property is read only. How can I change the font (font.size for example) in this context?
0
Hi,
In Windows Forms you can change a font setting by creating a new Font object, for example:
If you have additional questions, feel free to contact me.
Sincerely yours,
Nikolay
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.
In Windows Forms you can change a font setting by creating a new Font object, for example:
RadButtonElement ribe =
new
RadButtonElement();
ribe.Font =
new
Font(ribe.Font.FontFamily, 15, ribe.Font.Style);
If you have additional questions, feel free to contact me.
Sincerely yours,
Nikolay
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
Jerome Prunera-Usach
Top achievements
Rank 1
answered on 18 Nov 2010, 10:38 PM
Hello,
I am trying to achieve exactly what the topic of the thread is about : include a User Control in the Carousel.
I have tried to put exactly the code proposed by Peter (from 2008) with no real success :
The problem I encounter is that if I put that in a loop (4 occurences for example), it will only add two elements and the carousel's rotation and events are not fired anymore.
What I am trying to achieve is the following :
Any help would be highly appreciated as being able to use UserControl in the Carousel would be perfect for the software I am currently designing. (Maybe I am missing the obvious also :) )
I am trying to achieve exactly what the topic of the thread is about : include a User Control in the Carousel.
I have tried to put exactly the code proposed by Peter (from 2008) with no real success :
DateTimePicker ctl =
new
DateTimePicker();
ctl.AutoSize =
false
;
//switch off MS autolayout functionality
ctl.MinimumSize =
new
Size(110,20);
RadHostItem hostItem =
new
RadHostItem( ctl );
this
.radCarousel1.Items.Add(hostItem);
The problem I encounter is that if I put that in a loop (4 occurences for example), it will only add two elements and the carousel's rotation and events are not fired anymore.
What I am trying to achieve is the following :
for
(
int
i = 0 ; i < maxLength ; ++i)
{
MyUserControl ctl =
new
MyUserControl(param1, param2);
ctl.AutoSize =
false
;
ctl.MinimumSize =
new
Size(85, 25);
RadHostItem itm =
new
RadHostItem(ctl);
this
.myCarousel.Items.Add(itm);
}
Any help would be highly appreciated as being able to use UserControl in the Carousel would be perfect for the software I am currently designing. (Maybe I am missing the obvious also :) )
- OS Information : Windows XP x64 (version 2003) SP2
- Telerik : RadControls for WinForms 2010.3 10.1109
- Microsoft Visual Studio 2008
- .NET 3.5
0
Hello Jerome Prunera-Usach,
Thank you for writing.
I can confirm this issue. A fix for it will be available in our next release. Your Telerik points have been updated for the feedback. Do not hesitate to contact us if you have other questions.
Sincerely yours,
Peter
the Telerik team
Thank you for writing.
I can confirm this issue. A fix for it will be available in our next release. Your Telerik points have been updated for the feedback. Do not hesitate to contact us if you have other questions.
Sincerely yours,
Peter
the Telerik team
0
Jerome Prunera-Usach
Top achievements
Rank 1
answered on 23 Nov 2010, 05:01 PM
Thank you for your answer.