# C1.WPF.FlexGrid.ExcelContextMenu

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_FlexGrid_ExcelContextMenu" data-uid="C1.WPF.FlexGrid.ExcelContextMenu" class="text-break">ExcelContextMenu Class
</h1>
  <div class="markdown level0 summary"><p>Context menu customized for use with the C1FlexSheet control.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.threading.dispatcherobject">DispatcherObject</a></div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.dependencyobject">DependencyObject</a></div>
    <div class="level3"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.visual">Visual</a></div>
    <div class="level4"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.uielement">UIElement</a></div>
    <div class="level5"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a></div>
    <div class="level6"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.control">Control</a></div>
    <div class="level7"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.itemscontrol">ItemsControl</a></div>
    <div class="level8"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.primitives.menubase">MenuBase</a></div>
    <div class="level9"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.contextmenu">ContextMenu</a></div>
    <div class="level10"><span class="xref">ExcelContextMenu</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.animation.ianimatable">IAnimatable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.iframeworkinputelement">IFrameworkInputElement</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.iinputelement">IInputElement</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isupportinitialize">ISupportInitialize</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.markup.iqueryambient">IQueryAmbient</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.markup.iaddchild">IAddChild</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.primitives.icontainitemstorage">IContainItemStorage</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.FlexGrid.html">C1.WPF.FlexGrid</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.FlexSheet.4.6.2.dll</h6>
  <h5 id="C1_WPF_FlexGrid_ExcelContextMenu_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ExcelContextMenu : ContextMenu, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IContainItemStorage</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class ExcelContextMenu
    Inherits ContextMenu
    Implements IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IContainItemStorage</code></pre>
  </div>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_FlexGrid_ExcelContextMenu_ExecuteCommand_C1_WPF_FlexGrid_ContextMenuCommands_" data-uid="C1.WPF.FlexGrid.ExcelContextMenu.ExecuteCommand(C1.WPF.FlexGrid.ContextMenuCommands)">
          <a class="xref" href="C1.WPF.FlexGrid.ExcelContextMenu.ExecuteCommand.html#C1_WPF_FlexGrid_ExcelContextMenu_ExecuteCommand_C1_WPF_FlexGrid_ContextMenuCommands_">ExecuteCommand(ContextMenuCommands)</a>
        </td>
        <td class="markdown level1 summary"><p>Executes a context menu command.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_ExcelContextMenu_GetMenuItem_C1_WPF_FlexGrid_ContextMenuCommands_" data-uid="C1.WPF.FlexGrid.ExcelContextMenu.GetMenuItem(C1.WPF.FlexGrid.ContextMenuCommands)">
          <a class="xref" href="C1.WPF.FlexGrid.ExcelContextMenu.GetMenuItem.html#C1_WPF_FlexGrid_ExcelContextMenu_GetMenuItem_C1_WPF_FlexGrid_ContextMenuCommands_">GetMenuItem(ContextMenuCommands)</a>
        </td>
        <td class="markdown level1 summary"><p>Get a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.menuitem">MenuItem</a> based on a command code.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_ExcelContextMenu_IsItemItsOwnContainerOverride_System_Object_" data-uid="C1.WPF.FlexGrid.ExcelContextMenu.IsItemItsOwnContainerOverride(System.Object)">
          <a class="xref" href="C1.WPF.FlexGrid.ExcelContextMenu.IsItemItsOwnContainerOverride.html#C1_WPF_FlexGrid_ExcelContextMenu_IsItemItsOwnContainerOverride_System_Object_">IsItemItsOwnContainerOverride(object)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_FlexGrid_ExcelContextMenu_OnOpened_System_Windows_RoutedEventArgs_" data-uid="C1.WPF.FlexGrid.ExcelContextMenu.OnOpened(System.Windows.RoutedEventArgs)">
          <a class="xref" href="C1.WPF.FlexGrid.ExcelContextMenu.OnOpened.html#C1_WPF_FlexGrid_ExcelContextMenu_OnOpened_System_Windows_RoutedEventArgs_">OnOpened(RoutedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Overridden to disable paste command if the clipboard is empty when the context menu opens.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
