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

Carousel with textboxes

1 Answer 99 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Zbigniew Kozłowski
Top achievements
Rank 1
Zbigniew Kozłowski asked on 24 Nov 2010, 09:04 PM
Hi,
i just started to play with carousel and found some problems ;) In carousel each item got 1 textbox so user can write some notes, and i cant make two things:
1. How can i change selected item when user clicks on textbox in another item (not currently selected) it work only when user click on border
2. How can i focus on textbox when user change item via scroll or border click or anything, so basicly when selecteditem is changed than focus on selecteditems textbox

This is mine itemTemplate
<DataTemplate x:Key="ItemTemplate">
                <Grid Width="350" Height="450">
                    <Grid.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFFFFEA0" Offset="0"/>
                            <GradientStop Color="#FFFFFE6A" Offset="0.567"/>
                        </LinearGradientBrush>
                    </Grid.Background>
                    <TextBox Grid.Row="1" Text="{Binding Path=Content,Mode=TwoWay}" Background="Transparent"/>
                </Grid>
            </DataTemplate>

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 30 Nov 2010, 02:22 PM
Hi Zbigniew Kozłowski,

You may add a handler to the RadCarousel for the mouse click event. Once you get the clicked item, you may find its parent - CarouselItem and set it as the selected one. I am sending you a sample project illustrating the proposed solution.

Greetings,
Maya
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
Carousel
Asked by
Zbigniew Kozłowski
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or