# GrapeCity.Viewer.Common.DelegateCommand-1.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Viewer_Common_DelegateCommand_1__ctor_" data-uid="GrapeCity.Viewer.Common.DelegateCommand`1.#ctor*">DelegateCommand Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Viewer_Common_DelegateCommand_1__ctor_" data-uid="GrapeCity.Viewer.Common.DelegateCommand`1.#ctor*"></a>
<h4 id="GrapeCity_Viewer_Common_DelegateCommand_1__ctor_System_Action__0__System_Predicate__0__" data-uid="GrapeCity.Viewer.Common.DelegateCommand`1.#ctor(System.Action{`0},System.Predicate{`0})">DelegateCommand(Action&lt;TParm&gt;, Predicate&lt;TParm&gt;)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Viewer.Common.DelegateCommand-1.html">DelegateCommand&lt;TParm&gt;</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public DelegateCommand(Action&lt;TParm&gt; executeAction, Predicate&lt;TParm&gt; canExecute)</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="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;TParm&gt;</td>
      <td><span class="parametername">executeAction</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.predicate-1">Predicate</a>&lt;TParm&gt;</td>
      <td><span class="parametername">canExecute</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Viewer_Common_DelegateCommand_1__ctor_" data-uid="GrapeCity.Viewer.Common.DelegateCommand`1.#ctor*"></a>
<h4 id="GrapeCity_Viewer_Common_DelegateCommand_1__ctor_System_Action__0__" data-uid="GrapeCity.Viewer.Common.DelegateCommand`1.#ctor(System.Action{`0})">DelegateCommand(Action&lt;TParm&gt;)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Viewer.Common.DelegateCommand-1.html">DelegateCommand&lt;TParm&gt;</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public DelegateCommand(Action&lt;TParm&gt; executeAction)</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="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;TParm&gt;</td>
      <td><span class="parametername">executeAction</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
