Carousel with textboxes

2 posts, 0 answers
  1. Zbigniew Kozłowski
    Zbigniew Kozłowski avatar
    60 posts
    Member since:
    Apr 2010

    Posted 24 Nov 2010 Link to this post

    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>
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 30 Nov 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top