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

switch off mouse wheel & move for RadCoverFlow

18 Answers 112 Views
CoverFlow
This is a migrated thread and some comments may be shown as answers.
JJ Loubser
Top achievements
Rank 1
JJ Loubser asked on 14 Jul 2011, 09:31 AM
I used demo http://demos.telerik.com/silverlight/#CoverFlow/DataBinding in my project and working fine, but we have a mouse wheel method for our projects scrollbar works fine, but  that move my images when i got focus on it. How can I switch off all mouse wheel and mouse move activities for my RadCoverFlow control?

18 Answers, 1 is accepted

Sort by
0
Kris
Top achievements
Rank 1
answered on 14 Jul 2011, 03:57 PM
I have a scrollable ItemsControl inside my coverflow and also would like to know how to disable the mousewheel for the coverflow.
0
Accepted
Valeri Hristov
Telerik team
answered on 15 Jul 2011, 10:14 AM
Hello,

There is no property that disables the mouse wheel in RadCoverFlow, but you could inherit the control and override the OnMouseWheel method, without calling base. This should do the trick.

Greetings,
Valeri Hristov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
JJ Loubser
Top achievements
Rank 1
answered on 20 Jul 2011, 11:06 AM
thanks work like a bomb
0
Weeble
Top achievements
Rank 1
answered on 11 Oct 2011, 11:55 AM
Could you possibly add a code sample?

Cheers
0
Chandana
Top achievements
Rank 1
answered on 25 Oct 2011, 10:24 PM
Can you please add a code sample that does it? Thank you.
0
Accepted
Valeri Hristov
Telerik team
answered on 26 Oct 2011, 07:27 AM
Here is the code sample.

All the best,
Valeri Hristov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Henry
Top achievements
Rank 1
answered on 11 Feb 2014, 05:11 PM
That works fine, however, when you click on an item in the RadCoverFlow, the items scroll.  How can you disable the movement of the RadCoverFlow items when clicking an item inside RadCoverFlow.  Note: do not just set IsHitTestVisible to False... Still want the ability to select an Item inside RadCoverFlow.  Want all movement of items in RadCoverFlow to be done by the scrollbars.
0
Kalin
Telerik team
answered on 14 Feb 2014, 11:32 AM
Hi Henry,

What I can suggest you in order to achieve the desired behavior would to be place the CoverFlow inside of ScrollViewer as shown below:

<ScrollViewer HorizontalScrollBarVisibility="Auto">
    <local:CoverFlow>
        <Rectangle Fill="Red" Width="200" Height="200"  />
        <Rectangle Fill="Green" Width="200" Height="200" />
        <Rectangle Fill="Blue" Width="200" Height="200" />
        <Rectangle Fill="Magenta" Width="200" Height="200" />
        <Rectangle Fill="Red" Width="200" Height="200"  />
        <Rectangle Fill="Green" Width="200" Height="200" />
        <Rectangle Fill="Blue" Width="200" Height="200" />
        <Rectangle Fill="Magenta" Width="200" Height="200" />
    </local:CoverFlow>
</ScrollViewer>

This way when you click on an item it will get selected but won't move in the center. However please note this approach will only work with latest version of the controls.

Hope this helps.

Regards,
Kalin
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

0
Henry
Top achievements
Rank 1
answered on 14 Feb 2014, 04:01 PM
Unfortunately, that does not work.  The items inside of the coverflow still move.  I am using Silverlight controls 2013.3 1316 from Jan 17 2014.  Attached is my project. (oops, cannot attach zip file, gif, jpg, etc. are only allowed)  Possibly you can provide pointers?
0
Kalin
Telerik team
answered on 19 Feb 2014, 09:43 AM
Hi Henry,

By design the selected item has been rotated in order to be distinguished from the others. If you also need to disable that rotation and the scale of the items so they all look the same - you could try the following code snippet:

<ScrollViewer HorizontalScrollBarVisibility="Auto">
    <telerik:RadCoverFlow DistanceBetweenItems="210"
                            ItemScale="1" RotationY="0"
                            DistanceFromSelectedItem="10"
                            IsReflectionEnabled="False">
        <Rectangle Fill="Red" Width="200" Height="200"  />
        <Rectangle Fill="Green" Width="200" Height="200" />
        <Rectangle Fill="Blue" Width="200" Height="200" />
        <Rectangle Fill="Magenta" Width="200" Height="200" />
        <Rectangle Fill="Red" Width="200" Height="200"  />
        <Rectangle Fill="Green" Width="200" Height="200" />
        <Rectangle Fill="Blue" Width="200" Height="200" />
        <Rectangle Fill="Magenta" Width="200" Height="200" />
    </telerik:RadCoverFlow>
</ScrollViewer>

You can also check the Configurator example from our online demos where you can further experiment with provided properties of the CoverFlow. However if this solution doesn't achieve the desired scenario, I'll ask you to open new support ticket where you can attach a sample project and share some more details on the exact requirements and issues you are facing.

Hope this will work for you.

Regards,
Kalin
Telerik
0
Henry
Top achievements
Rank 1
answered on 20 Feb 2014, 02:56 PM
Hi Kalin -- I think we are off what the simple objective was to be.  I am simply trying to select an item in a RadCoverFlow without the panning (ie: moving the selected item to center).  That is it....  Note: cannot set IsHittTestVisible to false property because that would disable selecting an item in RadCoverFlow.  I was hoping this would be super simple.... thanks
0
Kalin
Telerik team
answered on 24 Feb 2014, 09:15 AM
Hi Henry,

My first suggestion actually was achieving the desired scenario. Please check the attached video which demonstrates it. When you click on an item it gets selected and it doesn't move to the center. However if this is still not helping I'll ask to open new support thread for your exact case and share more details there as well as a sample project.

Hope this will work for you.

Regards,
Kalin
Telerik
0
Henry
Top achievements
Rank 1
answered on 24 Feb 2014, 01:53 PM
Can you attach your project to this thread?  That is exactly what I am trying to do.
Thanks,..
0
Kalin
Telerik team
answered on 25 Feb 2014, 01:24 PM
Hi Henry,

You can check the attached project which demonstrates the exact approach. Please note that this works only with the latest release version of the controls.

Hope this helps.

Regards,
Kalin
Telerik
0
Henry
Top achievements
Rank 1
answered on 25 Feb 2014, 01:35 PM
Perfect!  the key was needing the latest version of controls.  My Telerik License was goofed up and I was not getting the latest version.  Now that the license thing is all squared away -- once download, all is working.
thanks,
HH
0
Henry
Top achievements
Rank 1
answered on 03 Mar 2014, 05:14 PM

Hi Kalin: That worked great until you added itemScale to the RadCoverFlow and then the last block gets cut in half.

<ScrollViewer x:Name="myScroll" HorizontalScrollBarVisibility="Auto" Margin="158,125,175,156" >
 <telerik:RadCoverFlow x:Name="myFlow" SelectionChanged="RadCoverFlow_SelectionChanged" RotationY="0" DistanceFromSelectedItem="5" DistanceBetweenItems="205" ItemScale="0.8" IsReflectionEnabled="False" >
  <Rectangle Fill="Red" Width="200" Height="200" Tag="0"  />
  <Rectangle Fill="Green" Width="200" Height="200" Tag="1" />
  <Rectangle Fill="Blue" Width="200" Height="200" Tag="2"/>
  <Rectangle Fill="Magenta" Width="200" Height="200" Tag="3"/>
  <Rectangle Fill="Red" Width="200" Height="200"  Tag="4"/>
  <Rectangle Fill="Green" Width="200" Height="200" Tag="5"/>
  <Rectangle Fill="Blue" Width="200" Height="200" Tag="6"/>
  <Rectangle Fill="Magenta" Width="200" Height="200" Tag="7"/>
  <Rectangle Fill="Red" Width="200" Height="200"  Tag="8"/>
  <Rectangle Fill="Green" Width="200" Height="200" Tag="9"/>
  <Rectangle Fill="Blue" Width="200" Height="200" Tag="10"/>
  <Rectangle Fill="Magenta" Width="200" Height="200" Tag="11"/>
  <Rectangle Fill="Red" Width="200" Height="200"  Tag="12"/>
  <Rectangle Fill="Green" Width="200" Height="200" Tag="13"/>
  <Rectangle Fill="Blue" Width="200" Height="200" Tag="14"/>
  <Rectangle Fill="Magenta" Width="200" Height="200" Tag="15"/>
  <Rectangle Fill="Red" Width="200" Height="200"  Tag="16"/>
  <Rectangle Fill="Green" Width="200" Height="200" Tag="17"/>
  <Rectangle Fill="Blue" Width="200" Height="200" Tag="18"/>
  <Rectangle Fill="Magenta" Width="200" Height="200" Tag="19"/>
  <Rectangle Fill="Red" Width="200" Height="200"  Tag="20"/>
  <Rectangle Fill="Green" Width="200" Height="200" Tag="21"/>
  <Rectangle Fill="Blue" Width="200" Height="200" Tag="22"/>
  <Rectangle Fill="Magenta" Width="200" Height="200" Tag="23"/>
 </telerik:RadCoverFlow>
</ScrollViewer>
0
Kalin
Telerik team
answered on 06 Mar 2014, 08:58 AM
Hi Henry,

The approach I suggested you - to place the CoverFlow inside of the ScrollViewer was just workaround to achieve the desired, however it appears there is issue caused by the ScrollViewer when the ItemScale is different than one. However what I can suggest you now is to either set the ItemScale to 1 or add an additional transparent Rectangle at the end:

<Rectangle Fill="Transparent" Width="200" Height="200"  />

This way that last item won't be cropped, but there will be some white space at the end.

Hope this helps.

Regards,
Kalin
Telerik

DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

0
Henry
Top achievements
Rank 1
answered on 06 Mar 2014, 01:51 PM
Hi Kalin:
That will probably work -- plus, since I know how many items I have in my flow, I will just ignore the SELECT command if the item selected is equal to ITEMS.COUNT  (IE: the last transparent item).
Thanks,
Tags
CoverFlow
Asked by
JJ Loubser
Top achievements
Rank 1
Answers by
Kris
Top achievements
Rank 1
Valeri Hristov
Telerik team
JJ Loubser
Top achievements
Rank 1
Weeble
Top achievements
Rank 1
Chandana
Top achievements
Rank 1
Henry
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or