4 Answers, 1 is accepted
The handling of the MouseWheel event is done internally, and there is no configuration exposed.
I'm interested what is your scenario, so we can add it as a feature for the RadTreeView.
Regards,
Valentin.Stoychev
the Telerik team
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Here is the scenario: I have a custom built UserControl that mimics functionality similar to what a MS Project’s Gantt view does but with a few twists. On the left part of the control, we leverage the RadTreeView and the right part is our pseudo-Gantt chart which sits inside of a ScrollViewer. The user has the ability to scroll through the data either using either the timebar header at the top of the Gantt chart or by using the scrollbars when they present themselves. I have linked the Gantt Vertical Scrollbar to the RadTreeView’s vertical scrollbar in XAML and hidden the Scrollbars in the RadTreeView so that the user is always controlling movement from within the Gantt portion only. Mousewheel events are also used inside the Gantt ScrollViewer control for navigation.
Everything works correctly until the user performs a Mousewheel event inside the treeview control which causes the two controls to become out of sync.
As I am writing this, I realized that one possible solution is to just capture the ScrollViewer events within the RadTreeView and force an update to match in the Gantt’s ScrollViewer but I’m not sure if that would cause a circular reference/update loop.
I’ve attached screenshots to help make the above a little bit easier to understand.
Regards,
Shawn
You can use the PreviewMouseWheel event to handle the MouseWheel. Sorry for not mentioning this the first time. Here is the code:
XAML:
<TreeView Height="100" PreviewMouseWheel="TreeView_PreviewMouseWheel">
Code Behind:
private void TreeView_PreviewMouseWheel(object sender, MouseWheelEventArgs e) {
e.Handled = true;
}
Best wishes,
Valentin.Stoychev
the Telerik team
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Shawn