From what I can tell, the RadCarousel control is the desired control to use for using DataBinding. However, my particular need requires theuse of RadCarousel. Do you have any suggestions to do DataBinding with theRadCarouselPanel?
Thanks,
Ryan
13 Answers, 1 is accepted
Could you be more specific about the requirements of your project? What stops you from using RadCarousel in favor of RadCarouselPanel?
Kind regards,
Milan
the Telerik team

Well, if you prefer to use data binding and the UI that you have to present is data driven - dependent of some sort of collection of data (collection of Person classes, for example) - RadCarousel is the right choice. You can use its ItemTemplate property to customize the appearance of the items. Our "Custom Item Template" example demonstrates how this property can be utilized.
Greetings,
Milan
the Telerik team

There should be no problem to have a ScrollViewer inside RadCarousel.
Greetings,
Milan
the Telerik team

Here is my very simple application:
<Grid> |
<ScrollViewer Name="ScrollBar" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Hidden" VerticalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"> |
<telerik:RadCarousel Name="radCarousel1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" /> |
</ScrollViewer> |
</Grid> |
using System.Collections.Generic; |
using System.Windows; |
namespace WpfApplication5 |
{ |
/// <summary> |
/// Interaction logic for MainWindow.xaml |
/// </summary> |
public partial class MainWindow : Window |
{ |
public MainWindow() |
{ |
InitializeComponent(); |
List<CarouselItem> CarouselItems = new List<CarouselItem>(); |
CarouselItems.Add(new CarouselItem { Content = "Content is Here", Title = "Item 1" }); |
CarouselItems.Add(new CarouselItem { Content = "More Content is Here", Title = "Item 2" }); |
radCarousel1.ItemsSource = CarouselItems; |
} |
} |
} |
public class CarouselItem |
{ |
private string _Title; |
public string Title |
{ |
get { return _Title; } |
set { _Title = value; } |
} |
private string _Content; |
public string Content |
{ |
get { return _Content; } |
set { _Content = value; } |
} |
} |
It seems that I have misunderstood you - excuse me for that. I though your idea was to palace a ScrollViewer inside each carousel item. RadCarousel has a built in ScrollViewer which is also visible - the buttons that you see on the bottom of RadCarousel are part of the built-in ScrollViewer.
Maybe you would like to have a standard looking ScrollViewer.
Regards,
Milan
the Telerik team

I am sending you a sample that demonstrates how you can tweak the carousel to use the default ScrollBar style.
Sincerely yours,
Milan
the Telerik team

You can use the ItemsPanel property of RadCarousel to provide a RadCarousel of your choosing. For example:
<
telerik:RadCarousel
Name
=
"RadCarousel1"
Loaded
=
"RadCarousel1_Loaded"
>
<
telerik:RadCarousel.ItemsPanel
>
<
ItemsPanelTemplate
>
<
telerik:RadCarouselPanel
ItemsPerPage
=
"3"
Path
=
"{StaticResource MyPath}"
/>
</
ItemsPanelTemplate
>
</
telerik:RadCarousel.ItemsPanel
>
</
telerik:RadCarousel
>
Greetings,
Milan
the Telerik team

Here is a path that looks like the one in our documentation.
<
Window.Resources
>
<
Path
x:Key
=
"customPath"
Stretch
=
"Fill"
Height
=
"100"
Data
=
"M639,-115.5 C702,-106.5 666.49972,-35 491.49972,-35 300.4994,-35 293.49973,-116 343.50004,-116"
>
</
Path
>
</
Window.Resources
>
<
Grid
>
<
telerik:RadCarousel
Name
=
"RadCarousel1"
Loaded
=
"RadCarousel1_Loaded"
>
<
telerik:RadCarousel.ItemsPanel
>
<
ItemsPanelTemplate
>
<
telerik:RadCarouselPanel
ItemsPerPage
=
"7"
Path
=
"{StaticResource customPath}"
AutoLoadItems
=
"False"
/>
</
ItemsPanelTemplate
>
</
telerik:RadCarousel.ItemsPanel
>
</
telerik:RadCarousel
>
</
Grid
>
Milan
the Telerik team