BringDataItemIntoView doesn't work in some circumstances

2 posts, 1 answers
  1. Oliver
    Oliver avatar
    263 posts
    Member since:
    Feb 2011

    Posted 14 Mar 2012 Link to this post

    Hi,

    I use Telerik V2010.3.1314.35

    I have a TabControl with 2 TabItems, the first one contain a text and the second one contain  RadCarousel with 3 images. Of course, the default TabItme is the first one (the one who contain the text). When I star my application, I add my text to my first TabItem and I add my 3 images into my carousel. After adding my images to my carousel, I do the following:

    carousel.BringDataItemIntoView(carousel.Items[0]);

    After finishing reading my text, I click on my second tab to see the first image of my carousel and it's not there, I have to click on the carousel navigation button to see my images...

    xaml:
                                        <telerik:RadCarousel Background="Transparent" ToolTip="{StaticResource ObtainCarouselFullscreen}" Name="SignCtxDocsCarousel" MouseRightButtonDown="SignCtxDocsCarousel_MouseRightButtonDown" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden" IsSynchronizedWithCurrentItem="True">
                                                    <telerik:RadCarousel.ItemsPanel>
                                                        <ItemsPanelTemplate>
                                                            <telerik:RadCarouselPanel Path="{StaticResource horizontalPath}"/>
                                                        </ItemsPanelTemplate>
                                                    </telerik:RadCarousel.ItemsPanel>
                                                </telerik:RadCarousel>

    code:
    -------

    carousel.Items.Add(img);

    if

     

    (carousel.Items.Count > 0)

     

    {

    carousel.BringDataItemIntoView(carousel.Items[0]);


    }


    Thank's
  2. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 15 Mar 2012 Link to this post

    Hello,

     Please call the BringDataItemIntoView method when the Loaded event of the RadCarousel is raised.
    Hopefully this will help.

    All the best,
    Didie
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top