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
315
Way to test if Overflow Indicator is Visible?
posted

Is there a programmatic way to determine if the if the OverflowIndictorImage of an editor is visible?

Parents
  • 469350
    Offline posted

    Hi,

    This is not the most efficient code, but you could do it using UIElements:


            private bool IsOverflowIndicatorVisible(UltraTextEditor ultraTextEditor)
            {
                // Force a paint to make sure the UIElement tree is up-to-date.
                ultraTextEditor.Update();

                // Get the control UIElement.
                UIElement element = ultraTextEditor.UIElement;

                // See if there is a EditorWithTextOverflowIndicatorUIElement
                element = element.GetDescendant(typeof(EditorWithTextOverflowIndicatorUIElement));
                return element != null;
            }

Reply Children