Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Carousel > Carousel Get Item position

Not answered Carousel Get Item position

Feed from this thread
  • michel avatar

    Posted on Nov 8, 2010 (permalink)

    Hello everybody

    I'm using RadCarousel component and I want know if there any method
    in order to get the items position inside radCarousel (x and y).

    I need to retrieve this data when the selected item inside the component has change!

    Thank you!

    Reply

  • Maya Maya admin's avatar

    Posted on Nov 10, 2010 (permalink)

    Hi michel,

    In order to provide you with an appropriate solution, I would need a bit more details about the scenario you want to accomplish. What is the type of the items ? If you want to follow the change of the selected item, can you use the SelectionChanged event ?
     

    Best wishes,
    Maya
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.
  • Antonio avatar

    Posted on Nov 11, 2010 (permalink)

    Thank you very much for your answer,
    but I result the problem by my self!

    However programming RedCarousel I come across different problems like:
    1. How set offset (Code or XAMP) between Carousel items
    2. Calling methods by cliccking over an Carousel items
    3. And define Z-Deep between Carousel items

    Could you help me?

    Reply

  • Maya Maya admin's avatar

    Posted on Nov 12, 2010 (permalink)

    Hello alex,

    1. Unfortunately, for the time being you cannot control the offset between the items.
    2. You may add a handler for a click event for example and implement the logic you want. I am sending you a sample project illustrating how to handle double-click on an item.
    3. You may play along with the Scale as demonstrated in this example for RadCarouselPanel. Thus you may try to achieve a similar to result as desired. 

    Regards,
    Maya
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Antonio avatar

    Posted on Nov 15, 2010 (permalink)

    Thank you very much!

    My project is going on thanks your advice!
    I would like to know three more things:

    1. Is possible to increase width and height of the element at the center of the Carousel?
    2. with a timer I'm moving the carousel but when I reach the end I have to change the direction (Right to left) because The carousel doesn't restart this is how I'm doing:

    var panel = this.thumbCarousel.FindCarouselPanel();
     
                        if (directionRight)
                        {
                            panel.MoveBy(1);
                        }
                        else
                        {
                            panel.MoveBy(-1);
                        }
                        if (this.HasReachedEnd())
                            directionRight = false;
                        if (HasReachedStart())
                        {
                            directionRight = true;
                        }
     
                        RadCarouselPanel radP = this.thumbCarousel.FindCarouselPanel();
                        if (radP.TopContainer != null)
                        {
                            radTransCtrl.Content = (IntPtr)(((CarouselItem)radP.TopContainer).Item);
                            updateText();
                        }
    3. in the code showed above "radTransCtrl" is a Transaction control which show the center element of the carousel but it doesn't take it instated it takes the previeus one How is possible?
     
    Thank you!

    Reply

  • Maya Maya admin's avatar

    Posted on Nov 18, 2010 (permalink)

    Hello alex,

    In order to change the size of the center item, you may use scaling. For example:

    <telerik:RadCarousel x:Name="MilanCarousel" Background="Black" >           
        <telerik:RadCarousel.ItemsPanel>
            <ItemsPanelTemplate>
                <telerik:RadCarouselPanel ItemsPerPage="5">
                    <telerik:RadCarouselPanel.ScaleStops>
                        <telerik:PathStopCollection>
                            <telerik:PathStop PathFraction="0.4" Value="1.0"/>
                            <telerik:PathStop PathFraction="0.5" Value="2.0"/>
                            <telerik:PathStop PathFraction="0.6" Value="1.0"/>
                        </telerik:PathStopCollection>
                    </telerik:RadCarouselPanel.ScaleStops>
            </telerik:RadCarouselPanel>
        </ItemsPanelTemplate>
         </telerik:RadCarousel.ItemsPanel>
    </telerik:RadCarousel>

    For further reference, you may take a look at our demo for RadCarousel.
    Considering your second concern, I would need a bit more information. When are you executing the movement ? What is the implementation of the method HasReachedEnd() ?  Any relevant code-snippet and details about your customization would be helpful.

    Kind regards,
    Maya
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Carousel > Carousel Get Item position
Related resources for "Carousel Get Item position"

WPF Carousel Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]