# C1.Win.Accessibility.Items.UiaMenuItem.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Accessibility_Items_UiaMenuItem__ctor_" data-uid="C1.Win.Accessibility.Items.UiaMenuItem.#ctor*">UiaMenuItem Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Accessibility_Items_UiaMenuItem__ctor_" data-uid="C1.Win.Accessibility.Items.UiaMenuItem.#ctor*"></a>
<h4 id="C1_Win_Accessibility_Items_UiaMenuItem__ctor_C1_Win_Accessibility_ISupportUia_C1_Win_Accessibility_UiaItem_System_Windows_Forms_Control_C1_Win_Accessibility_ISupportUiaContainer_C1_Win_Accessibility_Items_BaseInterfaces_IUiaExpandCollapseProvider_C1_Win_Accessibility_Items_BaseInterfaces_IUiaInvokeProvider_C1_Win_Accessibility_Items_BaseInterfaces_IUiaScrollItemProvider_C1_Win_Accessibility_Items_BaseInterfaces_IUiaToggleProvider_C1_Win_Accessibility_Items_BaseInterfaces_IUiaSelectionItemProvider_System_String_System_Windows_Forms_Control_System_Object_" data-uid="C1.Win.Accessibility.Items.UiaMenuItem.#ctor(C1.Win.Accessibility.ISupportUia,C1.Win.Accessibility.UiaItem,System.Windows.Forms.Control,C1.Win.Accessibility.ISupportUiaContainer,C1.Win.Accessibility.Items.BaseInterfaces.IUiaExpandCollapseProvider,C1.Win.Accessibility.Items.BaseInterfaces.IUiaInvokeProvider,C1.Win.Accessibility.Items.BaseInterfaces.IUiaScrollItemProvider,C1.Win.Accessibility.Items.BaseInterfaces.IUiaToggleProvider,C1.Win.Accessibility.Items.BaseInterfaces.IUiaSelectionItemProvider,System.String,System.Windows.Forms.Control,System.Object)">UiaMenuItem(ISupportUia, UiaItem, Control, ISupportUiaContainer, IUiaExpandCollapseProvider, IUiaInvokeProvider, IUiaScrollItemProvider, IUiaToggleProvider, IUiaSelectionItemProvider, string, Control, object)</h4>
<div class="markdown level1 summary"><p>Constructor.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public UiaMenuItem(ISupportUia sourceItem, UiaItem uiaParent = null, Control rootControl = null, ISupportUiaContainer sourceContainer = null, IUiaExpandCollapseProvider expandCollapseItem = null, IUiaInvokeProvider invokeItem = null, IUiaScrollItemProvider scrollItem = null, IUiaToggleProvider toggleItem = null, IUiaSelectionItemProvider selectionItem = null, string uiaName = null, Control itemControl = null, object objectToCache = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(sourceItem As ISupportUia, Optional uiaParent As UiaItem = Nothing, Optional rootControl As Control = Nothing, Optional sourceContainer As ISupportUiaContainer = Nothing, Optional expandCollapseItem As IUiaExpandCollapseProvider = Nothing, Optional invokeItem As IUiaInvokeProvider = Nothing, Optional scrollItem As IUiaScrollItemProvider = Nothing, Optional toggleItem As IUiaToggleProvider = Nothing, Optional selectionItem As IUiaSelectionItemProvider = Nothing, Optional uiaName As String = Nothing, Optional itemControl As Control = Nothing, Optional objectToCache As Object = Nothing)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Win.Accessibility.ISupportUia.html">ISupportUia</a></td>
      <td><span class="parametername">sourceItem</span></td>
      <td><p>Item with ISupportUia.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.Accessibility.UiaItem.html">UiaItem</a></td>
      <td><span class="parametername">uiaParent</span></td>
      <td><p>UIA parent of this item.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control">Control</a></td>
      <td><span class="parametername">rootControl</span></td>
      <td><p>Root control for all items.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.Accessibility.ISupportUiaContainer.html">ISupportUiaContainer</a></td>
      <td><span class="parametername">sourceContainer</span></td>
      <td><p>Container with inner items.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.Accessibility.Items.BaseInterfaces.IUiaExpandCollapseProvider.html">IUiaExpandCollapseProvider</a></td>
      <td><span class="parametername">expandCollapseItem</span></td>
      <td><p>Item with IUiaExpandCollapseProvider.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.Accessibility.Items.BaseInterfaces.IUiaInvokeProvider.html">IUiaInvokeProvider</a></td>
      <td><span class="parametername">invokeItem</span></td>
      <td><p>Item with IUiaInvokeProvider.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.Accessibility.Items.BaseInterfaces.IUiaScrollItemProvider.html">IUiaScrollItemProvider</a></td>
      <td><span class="parametername">scrollItem</span></td>
      <td><p>Item with IUiaScrollItemProvider.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.Accessibility.Items.BaseInterfaces.IUiaToggleProvider.html">IUiaToggleProvider</a></td>
      <td><span class="parametername">toggleItem</span></td>
      <td><p>Item with IUiaToggleProvider.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.Accessibility.Items.BaseInterfaces.IUiaSelectionItemProvider.html">IUiaSelectionItemProvider</a></td>
      <td><span class="parametername">selectionItem</span></td>
      <td><p>Item with IUiaSelectionItemProvider.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">uiaName</span></td>
      <td><p>Custom name for this item.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control">Control</a></td>
      <td><span class="parametername">itemControl</span></td>
      <td><p>Original control of this item.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">objectToCache</span></td>
      <td><p>Object for caching.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
