Hi Guys,
I downloaded telerik WPF controls trial version and intended to replace the Microsoft TreeView control in our existing product with Telerik RadTreeView. Currently, I am at the stage of building a prototype to make sure that all of the existing features are still working.
We have extended RadTreeView and RadTreeViewItem to support various stuff such as ViewModel binding, custom Events and custom Drag and Drop.
Our custom drag and drop functionality utilizes the mouse events (i.e. take the mouse position on mouse down, decide whether it triggers a drag operation, end drag on mouse up, etc).
For the last couple of days, I've been struggling with the conflicts in handling the MouseButtonDown in our drag and drop subsystem and the MouseButtonDown handle in RadTreeViewItem. Based on the Telerik forum posts, I found that the MouseLeftButtonDown event is handled internally and if we want to handle the events we have to call AddHandler with the third parameter set to true.
http://www.telerik.com/community/forums/wpf/gridview/q3-mousedown.aspx
http://www.telerik.com/community/forums/silverlight/gridview/radgridview-mouse-event-handling-and-performance-issues-in-q3-2009.aspx
I've done the above workaround and able to handle the MouseLeftButtonDown. However because e.Handled is now set to true, all of the controls up in the visual tree that use MouseLeftButtonDown event must handle the MouseLeftButtonDown event through AddHandler call as well. Unfortunately, it is not possible at the moment to change other subsystem to use the AddHandler.
At the moment, I'm thinking of setting the 'Handled' value to false in the MouseLeftButtonDown handle (from the AddHandler call) and allow the event to be bubbled up. Are there any way to detect that the MouseLeftButtonDown event is handled within the Telerik control? Because our treeviewitem contains a contentcontrol that displays edit button and delete button, if those button are pressed, we still want the Handled property to be true. If there is a guaranteed way to detect whether the MouseLeftButtonDown is handled internally in Telerik control, I could live with it and set the Handled to false when that happen.
Or, is there a way to configure the Telerik RadTreeViewItem to not set the Handled property to true?
PS: I only have one or two weeks trial left. Does anyone know what happen if the trial expires? Can I still continue building the prototype?
Kind regards,
Andie
I downloaded telerik WPF controls trial version and intended to replace the Microsoft TreeView control in our existing product with Telerik RadTreeView. Currently, I am at the stage of building a prototype to make sure that all of the existing features are still working.
We have extended RadTreeView and RadTreeViewItem to support various stuff such as ViewModel binding, custom Events and custom Drag and Drop.
Our custom drag and drop functionality utilizes the mouse events (i.e. take the mouse position on mouse down, decide whether it triggers a drag operation, end drag on mouse up, etc).
For the last couple of days, I've been struggling with the conflicts in handling the MouseButtonDown in our drag and drop subsystem and the MouseButtonDown handle in RadTreeViewItem. Based on the Telerik forum posts, I found that the MouseLeftButtonDown event is handled internally and if we want to handle the events we have to call AddHandler with the third parameter set to true.
http://www.telerik.com/community/forums/wpf/gridview/q3-mousedown.aspx
http://www.telerik.com/community/forums/silverlight/gridview/radgridview-mouse-event-handling-and-performance-issues-in-q3-2009.aspx
I've done the above workaround and able to handle the MouseLeftButtonDown. However because e.Handled is now set to true, all of the controls up in the visual tree that use MouseLeftButtonDown event must handle the MouseLeftButtonDown event through AddHandler call as well. Unfortunately, it is not possible at the moment to change other subsystem to use the AddHandler.
At the moment, I'm thinking of setting the 'Handled' value to false in the MouseLeftButtonDown handle (from the AddHandler call) and allow the event to be bubbled up. Are there any way to detect that the MouseLeftButtonDown event is handled within the Telerik control? Because our treeviewitem contains a contentcontrol that displays edit button and delete button, if those button are pressed, we still want the Handled property to be true. If there is a guaranteed way to detect whether the MouseLeftButtonDown is handled internally in Telerik control, I could live with it and set the Handled to false when that happen.
Or, is there a way to configure the Telerik RadTreeViewItem to not set the Handled property to true?
PS: I only have one or two weeks trial left. Does anyone know what happen if the trial expires? Can I still continue building the prototype?
Kind regards,
Andie