Mousewheel problem (introduced in Q3)

3 posts, 0 answers
  1. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 13 Nov 2009 Link to this post

    Hi, I noticed that the mouse wheel events seem to be "eaten" by the tree and not propagated to the parent container. I have all my trees inside scroll viewers, and on these I attach a behavior to get the mouse wheel functionality. So I am not using the MouseWheel event of RadTreeView at all. This used to work fine, but after upgrading to Q3 my scroll viewers no longer react to the mouse wheel events unless I position the mouse directly over the scroll bar. Is this a known issue? The XAML below should give you an indication of what I'm doing (I have removed all styling etc. for brevity). Let me know if you need more info.

            <b:MouseWheelScrollBehavior /> 
            <teleriknav:RadTreeView x:Name="TreeViewDomains"

  2. Miroslav
    Miroslav avatar
    922 posts

    Posted 15 Nov 2009 Link to this post

    Hello Henrik,

    The new thing in Q3 is the virtualization and scrolling is handled by the virtualizing panel.

    I investigated the issue and here it is:
    - There is a bug in the Silverlight ScrollViewer where the VerticalOffset will not be updated properly especially if it is updated in succession and by an IScrollInfo panel.
    - The virtualizing panel handles the scrolling in the TreeView and it may happen to update the VerticalOffset of the ScrollViewer quickly (in succession).
    - This is important in synchronous methods like GetItemByPath and BringIndexIntoView.

    I will spare the details, but our workaround for this bug breaks the mouse wheel in this case. We were not aware of this - thank you for reporting it. I have attached a project where you can see that only the TreeView handles the quick scrolling changes expectedly.

    Here is what I suggest:
    1. If you want to use UI virtualization (the IsVirtualizing="true"):
    - Any control placed in a ScrollViewer loses its virtualization. The control (the panel actually) needs to know about the ScrollViewer so that it extracts information about the visible parts from it. If you place the control in a ScrollViewer, it gets infinite space and therefore no items are virtualized.
    In this case you will need to edit the TreeView's template and alter the ScrollViewer there.
     2. If you do not want to use UI virtualziation:
    - We will make sure that the workaround I mentioned is not applied in this case. I have not tested this yet, but I do not expect issues there.
    - In the meantime you can change the ItemsPanel of the TreeView back to the "good old" StackPanel. I expect that your behavior will work then, the code for this is:

            <StackPanel />

    The changes in our code will be available with the next internal build and SP1.

    Your Telerik Points have been updated.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 24 Nov 2009 Link to this post

    Hi, thanks for the detailed answer. I have just upgraded to the latest internal build, and now it works just as before. :) Thank you.
Back to Top