Skip to content

Commit

Permalink
Fix ItemsControl Automation (#6862)
Browse files Browse the repository at this point in the history
* Fix ItemsControl Automation

* fix compiling
  • Loading branch information
walterlv committed Jan 19, 2023
1 parent 59b08c9 commit acacbd8
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -4009,6 +4009,15 @@ public override string ToString()
return SR.Get(SRID.ToStringFormatString_ItemsControl, this.GetType(), itemsCount);
}

protected override AutomationPeer OnCreateAutomationPeer()
{
if (!AccessibilitySwitches.ItemsControlDoesNotSupportAutomation)
{
return new ItemsControlWrapperAutomationPeer(this);
}
return null;
}

// This should really override OnCreateAutomationPeer, but that API addition
// isn't an option. When it becomes an option:
// a. rename this method to OnCreateAutomationPeer
Expand Down

0 comments on commit acacbd8

Please sign in to comment.