# C1.Win.C1Editor.C1Editor.CanCopy

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_C1Editor_C1Editor_CanCopy_" data-uid="C1.Win.C1Editor.C1Editor.CanCopy*">CanCopy Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_C1Editor_C1Editor_CanCopy_" data-uid="C1.Win.C1Editor.C1Editor.CanCopy*"></a>
<h4 id="C1_Win_C1Editor_C1Editor_CanCopy" data-uid="C1.Win.C1Editor.C1Editor.CanCopy">CanCopy</h4>
<div class="markdown level1 summary"><p>Gets a value indicating whether the copy command is supported on the current selection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Browsable(false)]
public bool CanCopy { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Browsable(False)&gt;
Public ReadOnly Property CanCopy As Boolean</code></pre>
</div>
<h5 id="C1_Win_C1Editor_C1Editor_CanCopy_examples">Examples</h5>
<p>This example shows how to create a custom context menu that can be linked to a C1Editor control and has Cut, Copy and Paste buttons.
<pre><code class="lang-csharp">class MyContextMenuStrip : ContextMenuStrip
{
private C1Editor _owner;
private ToolStripMenuItem _btnCut, _btnCopy, _btnPaste;
<pre><code>            public MyContextMenuStrip(C1Editor editor)
            {
                // save reference to parent control
                _owner = editor;

                // create menu items
                _btnCut = (ToolStripMenuItem)Items.Add(&quot;Cut&quot;);
                _btnCut.ShortcutKeys = Keys.Control | Keys.X;
                _btnCopy = (ToolStripMenuItem)Items.Add(&quot;Copy&quot;);
                _btnCopy.ShortcutKeys = Keys.Control | Keys.C;
                _btnPaste = (ToolStripMenuItem)Items.Add(&quot;Paste&quot;);
                _btnPaste.ShortcutKeys = Keys.Control | Keys.V;
            }

            protected override void OnItemClicked(ToolStripItemClickedEventArgs e)
            {
                Close();
                if (e.ClickedItem == _btnCopy)
                    _owner.Copy();
                else if (e.ClickedItem == _btnCut)
                    _owner.Cut();
                else if (e.ClickedItem == _btnPaste)
                    _owner.Paste();
                base.OnItemClicked(e);
            }

            protected override void OnOpening(System.ComponentModel.CancelEventArgs e)
            {
                _btnCopy.Enabled = _owner.CanCopy;
                _btnCut.Enabled = _owner.CanCut;
                _btnPaste.Enabled = _owner.CanPaste || _owner.CanPasteAsText;
                base.OnOpening(e);
           }&lt;/code&gt;&lt;/pre&gt;
</code></pre>
</code></pre>
</div>
