Hi,
We are implementing a drag and drop feature on an item control that contains complex UI elements.
When the number of UI elements increases, we see the frame-rate dropping considerably during the drag action.
After profiling the application, we see that what takes time is the GetElementsUnderMouse method (and inside it, the HitTestPointNegative method). Oddly, the cpu doesn't jump to the roof, it's just the framerate that drops below 10 per seconds!
Another related problem that might give an insight is that we use RadWindow a lot in our app. Apparently, the GetElementUnderMouse will get ALL the elements under the mouse, through the windows and anything else in the vidsual tree. This means that if we have 2 windows overlapping, the GetElementUnderMouse method is also getting the element that are behind the top window, which is really a big waste.
Is there any obvious way for us to get around this big performance problem? Of course reducing the number of UIElements in our controls seems the first approach to consider for us. What else could possibly cause such a behaviour?
Attached is a screenshot of the trace while dragging an element over our items control for a few seconds.
Stephane
We are implementing a drag and drop feature on an item control that contains complex UI elements.
When the number of UI elements increases, we see the frame-rate dropping considerably during the drag action.
After profiling the application, we see that what takes time is the GetElementsUnderMouse method (and inside it, the HitTestPointNegative method). Oddly, the cpu doesn't jump to the roof, it's just the framerate that drops below 10 per seconds!
Another related problem that might give an insight is that we use RadWindow a lot in our app. Apparently, the GetElementUnderMouse will get ALL the elements under the mouse, through the windows and anything else in the vidsual tree. This means that if we have 2 windows overlapping, the GetElementUnderMouse method is also getting the element that are behind the top window, which is really a big waste.
Is there any obvious way for us to get around this big performance problem? Of course reducing the number of UIElements in our controls seems the first approach to consider for us. What else could possibly cause such a behaviour?
Attached is a screenshot of the trace while dragging an element over our items control for a few seconds.
Stephane