Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

How to get the “PreferredWidth” of label control using the UIAutomation(Automationelement)?

$
0
0
Note: ControlType.Text has no supported patterns

I have tried with following steps to get "PreferredWidth" and it is not supporting

Step1:- 

        private GetLabelPreferredWidth()
        {
            AutomationElement objElement = objMainWindow.AutomationElement;           
            PropertyC
ondition cond = new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Text);
            AutomationElement textProvider = objElement.FindFirst(TreeScope.Descendants, cond);

        }

        Note:
        I need to get the “PreferredWidth” from the “textProvider”. But it is not available

Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>