Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
DrawFilter with ComboBoxTool used by an UltraDropDownButton
posted

I have a problem using a DrawFilter for a ComboBoxTool. The problem occurs when I use a ComboBoxTool within an UltraDropDownButton, but not within a Ribbon.


When I want to draw a text in the ComboBoxTool I use the GetPhaseToFilter method in the following way:


        public DrawPhase GetPhasesToFilter(ref UIElementDrawParams drawParams)
        {
            if (drawParams.Element is EditorWithTextDisplayTextUIElement)
            {
                ComboBoxToolUIElement uiComboBox = drawParams.Element.GetAncestor(typeof(ComboBoxToolUIElement)) as ComboBoxToolUIElement;
 
                if (uiComboBox != null && uiComboBox.ToolbarsManager.Tools[uiComboBox.Tool.Key] is ComboBoxTool)
                {
                    return DrawPhase.BeforeDrawForeground | DrawPhase.AfterDrawElement;
                }
            }
 
            return DrawPhase.None;
        }

When the ComboBoxTool is added to a Ribbon it works fine. But when the ComboBoxTool is added to an UltraDropDownButton it doesn't.

With the UIElements that come with the drawParams I'm not able to access the ComboBoxTool. But I need this to check the key and the ValueListItems.


Best regards.


Parents Reply Children
No Data