mpril
mpril

Reputation: 61

Add automationId to menuitem of sharpdevelop addin

I attempted to add automationId to menuItem in 'MyAddin.addin' file by this way

<Path name = ...>
    <Condition name=...>
       <Condition name=...>
          <Condition name=...>
             <MenuItem id='MyMenu' label='My menu' class='MyClass' AutomationProperties.AutomationId='MyItemId'/>
.....

it doesn't work. How can I do this another way? or what it wrong.

Upvotes: 0

Views: 196

Answers (1)

Matt Ward
Matt Ward

Reputation: 47967

The XML used in the .addin file is not XAML so adding an WPF automation property will not do anything since SharpDevelop will not read the attribute.

If you want to do this you will need to implement it yourself by either:

  1. Extending SharpDevelop to support this.
  2. Programatically setting the automation property on the menu in your addin.

Upvotes: 1

Related Questions