switch off mouse wheel & move for RadCoverFlow

19 posts, 2 answers
  1. JJ Loubser
    JJ Loubser avatar
    42 posts
    Member since:
    Jul 2009

    Posted 14 Jul 2011 Link to this post

    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?
  2. Kris
    Kris avatar
    1 posts
    Member since:
    Jul 2011

    Posted 14 Jul 2011 Link to this post

    I have a scrollable ItemsControl inside my coverflow and also would like to know how to disable the mousewheel for the coverflow.
  3. DevCraft banner
  4. Answer
    Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 15 Jul 2011 Link to this post

    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!

  5. JJ Loubser
    JJ Loubser avatar
    42 posts
    Member since:
    Jul 2009

    Posted 20 Jul 2011 Link to this post

    thanks work like a bomb
  6. Weeble
    Weeble avatar
    9 posts
    Member since:
    Sep 2011

    Posted 11 Oct 2011 Link to this post

    Could you possibly add a code sample?

    Cheers
  7. Chandana
    Chandana avatar
    13 posts
    Member since:
    Apr 2011

    Posted 25 Oct 2011 Link to this post

    Can you please add a code sample that does it? Thank you.
  8. Answer
    Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 26 Oct 2011 Link to this post

    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 >>

  9. Henry
    Henry avatar
    20 posts
    Member since:
    Aug 2013

    Posted 11 Feb 2014 in reply to Valeri Hristov Link to this post

    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.
  10. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 14 Feb 2014 Link to this post

    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).

  11. Henry
    Henry avatar
    20 posts
    Member since:
    Aug 2013

    Posted 14 Feb 2014 in reply to Kalin Link to this post

    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?
  12. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 19 Feb 2014 Link to this post

    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
  13. Henry
    Henry avatar
    20 posts
    Member since:
    Aug 2013

    Posted 20 Feb 2014 in reply to Kalin Link to this post

    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
  14. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 24 Feb 2014 Link to this post

    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
  15. Henry
    Henry avatar
    20 posts
    Member since:
    Aug 2013

    Posted 24 Feb 2014 in reply to Kalin Link to this post

    Can you attach your project to this thread?  That is exactly what I am trying to do.
    Thanks,..
  16. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 25 Feb 2014 Link to this post

    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
  17. Henry
    Henry avatar
    20 posts
    Member since:
    Aug 2013

    Posted 25 Feb 2014 in reply to Kalin Link to this post

    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
  18. Henry
    Henry avatar
    20 posts
    Member since:
    Aug 2013

    Posted 03 Mar 2014 in reply to Kalin Link to this post

    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>
  19. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 06 Mar 2014 Link to this post

    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!

  20. Henry
    Henry avatar
    20 posts
    Member since:
    Aug 2013

    Posted 06 Mar 2014 in reply to Kalin Link to this post

    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,
Back to Top
DevCraft banner