# GrapeCity.Wpf.SpreadSheet.Dialogs.BuiltInDialogs.ContextMenu

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Wpf_SpreadSheet_Dialogs_BuiltInDialogs_ContextMenu_" data-uid="GrapeCity.Wpf.SpreadSheet.Dialogs.BuiltInDialogs.ContextMenu*">ContextMenu Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Wpf_SpreadSheet_Dialogs_BuiltInDialogs_ContextMenu_" data-uid="GrapeCity.Wpf.SpreadSheet.Dialogs.BuiltInDialogs.ContextMenu*"></a>
<h4 id="GrapeCity_Wpf_SpreadSheet_Dialogs_BuiltInDialogs_ContextMenu_GrapeCity_Wpf_SpreadSheet_GcSpreadSheet_System_Windows_Input_ICommand_" data-uid="GrapeCity.Wpf.SpreadSheet.Dialogs.BuiltInDialogs.ContextMenu(GrapeCity.Wpf.SpreadSheet.GcSpreadSheet,System.Windows.Input.ICommand)">ContextMenu(GcSpreadSheet, ICommand)</h4>
<div class="markdown level1 summary"><p>Create a context menu on spread</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static ContextMenu ContextMenu(GcSpreadSheet spread, ICommand onExecutedCommand)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function ContextMenu(spread As GcSpreadSheet, onExecutedCommand As ICommand) As ContextMenu</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="GrapeCity.Wpf.SpreadSheet.GcSpreadSheet.html">GcSpreadSheet</a></td>
      <td><span class="parametername">spread</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Wpf.SpreadSheet.GcSpreadSheet.html">GcSpreadSheet</a>Spread</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.icommand">ICommand</a></td>
      <td><span class="parametername">onExecutedCommand</span></td>
      <td><p>The command to execute when menu item is selected.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.contextmenu">ContextMenu</a></td>
      <td><p>The <a class="xref" href="GrapeCity.Wpf.SpreadSheet.Dialogs.BuiltInDialogs.ContextMenu.html#GrapeCity_Wpf_SpreadSheet_Dialogs_BuiltInDialogs_ContextMenu_GrapeCity_Wpf_SpreadSheet_GcSpreadSheet_System_Windows_Input_ICommand_">ContextMenu(GcSpreadSheet, ICommand)</a></p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Wpf_SpreadSheet_Dialogs_BuiltInDialogs_ContextMenu_" data-uid="GrapeCity.Wpf.SpreadSheet.Dialogs.BuiltInDialogs.ContextMenu*"></a>
<h4 id="GrapeCity_Wpf_SpreadSheet_Dialogs_BuiltInDialogs_ContextMenu_GrapeCity_Wpf_SpreadSheet_GcSpreadSheet_System_Object_System_Windows_Input_ICommand_" data-uid="GrapeCity.Wpf.SpreadSheet.Dialogs.BuiltInDialogs.ContextMenu(GrapeCity.Wpf.SpreadSheet.GcSpreadSheet,System.Object,System.Windows.Input.ICommand)">ContextMenu(GcSpreadSheet, object, ICommand)</h4>
<div class="markdown level1 summary"><p>Create a context menu on spread</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static ContextMenu ContextMenu(GcSpreadSheet spread, object target, ICommand onExecutedCommand)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function ContextMenu(spread As GcSpreadSheet, target As Object, onExecutedCommand As ICommand) As ContextMenu</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="GrapeCity.Wpf.SpreadSheet.GcSpreadSheet.html">GcSpreadSheet</a></td>
      <td><span class="parametername">spread</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Wpf.SpreadSheet.GcSpreadSheet.html">GcSpreadSheet</a>Spread</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">target</span></td>
      <td><p>The target of this context menu.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.icommand">ICommand</a></td>
      <td><span class="parametername">onExecutedCommand</span></td>
      <td><p>The command to execute when menu item is selected.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.contextmenu">ContextMenu</a></td>
      <td><p>The <a class="xref" href="GrapeCity.Wpf.SpreadSheet.Dialogs.BuiltInDialogs.ContextMenu.html#GrapeCity_Wpf_SpreadSheet_Dialogs_BuiltInDialogs_ContextMenu_GrapeCity_Wpf_SpreadSheet_GcSpreadSheet_System_Windows_Input_ICommand_">ContextMenu(GcSpreadSheet, ICommand)</a></p>
</td>
    </tr>
  </tbody>
</table>
</div>
