I have been going through the Forum and Google tring to find how I get the current Item of the Carousel control. I need to get one value so that I can proceed to getting my data. When I pause the program I can see all the item in CurrentItems, but when I try to code CurrentItem.fname that is not an option. It appear as though this control has changed, but there is still information for the old way along with work arounds that no longer work. Could you please Help make this Work?
My XAML for just the Carousel is
My XAML for just the Carousel is
<
telerik:RadCarousel
x:Name
=
"RadCarousel"
Background
=
"Transparent"
Margin
=
"10,10,0,0"
Height
=
"72"
VerticalAlignment
=
"Top"
HorizontalScrollBarVisibility
=
"Hidden"
ItemTemplate
=
"{StaticResource CarouselItemTemplate}"
ItemsSource
=
"{Binding}"
SelectionChanged
=
"RadCarousel_SelectionChanged"
SelectedItem
=
"{Binding SelectedItem, Mode=TwoWay}"
>
<
telerik:RadCarousel.ItemsPanel
>
<
ItemsPanelTemplate
>
<
telerik:RadCarouselPanel
Path
=
"{StaticResource horizontalPath}"
/>
</
ItemsPanelTemplate
>
</
telerik:RadCarousel.ItemsPanel
>
</
telerik:RadCarousel
>
my Code behind is this
public
void
LoadSalesPerson(
object
sender, RoutedEventArgs e)
{
DataClasses1DataContext conn =
new
DataClasses1DataContext();
List<GetSalesPeopleResult> getSalesPeopleResults = (from s
in
conn.GetSalesPeople()
select s).ToList();
RadCarousel.ItemsSource = getSalesPeopleResults;
}
private
void
RadCarousel_SelectionChanged(
object
sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
{
int
index = RadCarousel.Items.IndexOf(RadCarousel.SelectedItem);
int
smm = RadCarousel.ElementAt(index);
}