Automation Pattern for ribbon:Button varies

Ribbon for WPF Forum

Posted 12 years ago by Tom P.
Version: 12.1.0562
Avatar

When we use a ribbon:Button in a ribbon:Tab (and ribbon:Group), the ribbon:Button supports the InvokePattern. However, if you include the same ribbon:Button inside the ribbon:Backstage, it supports the SelectionItemPattern and SynchronizedInputPattern.  We can't figure out why this is.

Any suggestions? Do we have to set the ribbon:Button.Context to something like ControlContext.BackstageItem?

Comments (3)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tom,

I'm not sure why that could be.  We don't change the automation peer in ribbon:Button based on its location or context setting.


Actipro Software Support

Posted 12 years ago by Tom P.
Avatar

It is very odd. Clearly, the Backstage is looking at the ribbon:Button as a BackstageHeaderItem.  In fact, if I set the ribbon:Button.Context to anything else, at runtime however, it's forced to BackstageHeaderItem.

Very confused. If you run UI Spy on Office Word, you can see that it's Options button implements the Invoke pattern.

I know you say the AutomationPeer is not changed, but it sure looks like it.  When a ribbon:Button appears in a ribbon:Backstage control, it is being considered a TabHeader, and hence the SelectionItem pattern is used.

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tom,

I see what's happening now.  Since the Backstage is a TabControl, it's automation peer creates the child item automation peers.  At the moment, those peers inherit TabItemAutomationPeer.  We will add support for InvokePattern on those for the next version.


Actipro Software Support

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.