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
20
UIAutomation issue with RibbonGroup
posted

I have a RibbonGroup in a WPF XAML application whose ItemsSource is tied to a selection in a list. On the initial load of the screen the contents of the RibbonGroup are accurately show in UIAutomation (using Inspect Objects).

The RibbonGroup:

And in Inspect;

Looking at a specific radio button it is focusable and has a BoundingRectangle:

Now after I click something in the list that forces the refresh the RibbonGroup is refreshed properly:

However Inspect still shows the old RibbonGroup contents:

And looking at one of the radio buttons they have no BoundingRectangle and all have the state of invisible.offscreen

Any suggestions?

We are using InfragisticsWPF4.Ribbon.v13.1.dll.  

  • 6365
    Offline posted

    Hello James,

    Thank you for the images and the description you have provided.

    I tested the behavior you have described in regards to the non-refreshing RadioButtonTools for the UI Automation and I was not able to reproduce it.
    I have used both the AutomationElement.FindAll method for getting all AutomationElements that represent RadioButtons and I inspected the elements directly. The result was as expected and only the current elements were present. (I tested the same behavior with a ListBox instead of the XamRibbon and the outcome was the same)

    Possible resolutions of the issue might be:

    • Implement the INotifyPropertyChanged for the underlying ItemsSource collection in order to update it if it gets reset. 
    • Refresh the inspection software before inspecting any elements after the update.

    I have attached a sample application where you can test the current radio button AutomationElements before and after the update.

    Would you please modify the sample so the issue is reproduced and send it back to me? Having this information will help me further investigate this matter for you.

    If you have any questions, please let me know.

    XamRibbon_sample.zip