Hello,
I'm currently adding UltraExplorerBarGroups to an UltraExplorerBar by dragging items from an UltraTree. What I'd like to do is show a drop location indicator in the explorer bar when I'm adding a new item in between existing items. Basically, the same indicator when you drag groups around to rearrage their order. Thanks.
Ah, I think I'm starting to see where my confusion came from. What I really want to do is show a drop location in between existing *groups*, not items. Basically, in the empty/dead space in between groups controlled by the GroupSpacing property. lf that's the case, was I doing the correct thing when I added the drop indicator to the group's child elements? That is:
group.UIElement.ChildElements.Add(dropHighlightElement);
Some UIElements are the physical manifestations of the objects exposed by the control; for example, the GroupUIElement is the physical manifestation of an UltraExplorerBarGroup. Many elements, GroupUIElement included, have constituent elements, such as the ItemAreaInnerUIElement and the UltraExplorerBarGroupHeaderUIElement. ItemAreaInnerUIElement just happens to be the element that contains the items, and in your original post you expressed the desire to show a drop location indicator in between existing items.
What's the reasoning behind adding it to ItemAreaInnerUIElement and not GroupUIElement? Does it have something to do with draw regions or draw order?
Sorry for all the questions, but I'm new to using Infragistics controls and I haven't been able to locate a document that explains how all these elements relate/interact with one another. Thanks for all of your help so far.
Your suspicion was correct, you don't want to add it to the GroupUIElement, you want to add it to the ItemAreaInnerUIElement. The reason the ChildElements collection is empty is because there are no items in the group.
I think I have a lead on what's going on now. DrawForeground will not get called if it can't draw in the specified rectangle. In this case, ItemAreaInnerUIElement's rectangle has a height of 0, so the drop highlight will never get drawn. My code works because DrawForeground will draw the line inside the UltraExplorerBarGroup rectangle, which would work ok.
So, is it fine for me to leave the code as-is, or should I be looking at changing ItemAreaInnerUIElement size somehow? Or to put it another way, do I have to draw the drop highlight inside ItemAreaInnerUIElement? Thanks.