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

using carousel with touch screen

1 Answer 142 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
KocSistem
Top achievements
Rank 1
KocSistem asked on 08 Apr 2011, 02:54 PM
Hi,
I'm having a couple of problems with my touchscreen inputs.

First of all, carousel doesn't understand single touch as a mouse left button down. i can select an item with mouse but i can't do that by touching the item. I can't find the right event to handle.

Secondly, I'm trying to scroll carousel with touchscreen inputs. As you can see it in my code, there is a ScrollViewer and its isManupulationEnabled = true.

  <ScrollViewer Name="scrollGallery" Grid.Row="3"  VerticalAlignment="Top" Height="289" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Visible" CanContentScroll="True" IsManipulationEnabled="True" ManipulationDelta="ScrollViewer_ManipulationDelta" ManipulationStarting="ScrollViewer_ManipulationStarting">
  <telerik:RadCarouselPanel   IsOpacityEnabled="True" IsScalingEnabled="True" IsSkewAngleYEnabled="True"   HorizontalAlignment="Left"   Height="289" Name="radCarousel"    Background="{x:Null}" Width="1013">
  </telerik:RadCarouselPanel>
</ScrollViewer>

However, it's scrolling too fast with the code below:
private void ScrollViewer_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)
       {
        
               scrollGallery.ScrollToHorizontalOffset(scrollGallery.HorizontalOffset - (e.DeltaManipulation.Translation.X * 0.000001));
 
           if (e.IsInertial)
           {
               e.Complete();
           }          
           e.Handled = true;
 
            
       }
 
       private void ScrollViewer_ManipulationStarting(object sender, ManipulationStartingEventArgs e)
       {
           e.ManipulationContainer = this;
           e.Handled = true;
       }

Even i multiply e.DeltaManipulation.Translation.X with 0.000001, its still too fast and not smooth

I have tried RadCarousel(not panel) before this but no success with it too.

I have also tried radCarousel.LineLeft() and LineRight() methods but got the same effect.

How can i scroll it smoothly? How can i handle touch inputs as left mouse button down?

Thanks
Gokay

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 13 Apr 2011, 03:18 PM
Hello,

Generally, the scrolling in the RadCarousel is done at the logic level - item per item. However, the behavior you want to achieve will require scrolling on physical level, which is not supported. 

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
Tags
Carousel
Asked by
KocSistem
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or