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

Allow multi selection in RadCarousel

1 Answer 82 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Grégoire
Top achievements
Rank 1
Grégoire asked on 06 May 2014, 02:23 PM
Hi,

I am struggeling for hours now to implement the multi selection in the carousel. I tried several ways, the last being this one :

<Style TargetType="{x:Type telerik:CarouselItem}">
 
        <Setter Property="Background" Value="AliceBlue" /><!--#50FFFFCC-->
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Height" Value="{Binding ItemHeight, RelativeSource={RelativeSource AncestorType={x:Type local:ILCarousel}}}" />
        <Setter Property="Width" Value="{Binding ItemWidth, RelativeSource={RelativeSource AncestorType={x:Type local:ILCarousel}}}" />
         
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:CarouselItem}">                                   
             <Border BorderThickness="2" CornerRadius="2" Padding="5" Background="{TemplateBinding Background}" BorderBrush="#FFB8D6FB">
                        <Grid>
                             
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                             
                            <Grid.RowDefinitions >
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
 
                            <local:ILScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" x:Name="content" Grid.ColumnSpan="3" >
                                <ContentPresenter Name="PART_presenter" />
                            </local:ILScrollViewer>
 
                            <CheckBox Grid.Column="0" IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}" >
                                <CheckBox.Visibility>
                                    <MultiBinding Converter="{StaticResource and}">
                                         
                                        <Binding Path="SelectionMode" Converter="{StaticResource visibleIfNotEquals}"
                                                 ConverterParameter="{x:Static SelectionMode.Single}"
                                                 RelativeSource="{RelativeSource AncestorType={x:Type local:ILCarousel}}" />
                                         
                                        <Binding Path="IsCurrent" RelativeSource="{RelativeSource TemplatedParent}" Converter="{StaticResource not}"/>
                                         
                                    </MultiBinding>
                                </CheckBox.Visibility>
                            </CheckBox>
                             
                            <CheckBox Grid.Column="2" IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}" >
                                <CheckBox.Visibility>
                                    <MultiBinding Converter="{StaticResource and}">
                                        <Binding Path="SelectionMode" Converter="{StaticResource visibleIfNotEquals}"
                                                 ConverterParameter="{x:Static SelectionMode.Single}"
                                                 RelativeSource="{RelativeSource AncestorType={x:Type local:ILCarousel}}" />
                                        <Binding Path="IsCurrent" RelativeSource="{RelativeSource TemplatedParent}"/>
                                    </MultiBinding>
                                </CheckBox.Visibility>
                            </CheckBox>
                             
                            <CheckBox Grid.Column="4" IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}" >
                                <CheckBox.Visibility>
                                    <MultiBinding Converter="{StaticResource and}">
                                        <Binding Path="SelectionMode" Converter="{StaticResource visibleIfNotEquals}"
                                                 ConverterParameter="{x:Static SelectionMode.Single}"
                                                 RelativeSource="{RelativeSource AncestorType={x:Type local:ILCarousel}}" />
                                        <Binding Path="IsCurrent" RelativeSource="{RelativeSource TemplatedParent}" Converter="{StaticResource not}"/>
                                    </MultiBinding>
                                </CheckBox.Visibility>
                            </CheckBox>
                             
                             
                        </Grid>
                    </Border>
 
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

But it acts as if the RadCarousel SelectedItems property is deactivated.

Do you have any idea how I could do this?

Thank you,

Grégoire

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 07 May 2014, 08:05 AM
Hello Grégoire,

Currently, RadCarousel does not support multiple selection. I have logged this functionality as a feature request in our Feedback Portal (Multiple selection in RadCarousel) so that you and other customers can vote for it and follow its progress.  

Regards,
Maya
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Carousel
Asked by
Grégoire
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or