# C1.WPF.C1DelegateCommand

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_C1DelegateCommand" data-uid="C1.WPF.C1DelegateCommand" class="text-break">C1DelegateCommand Class
</h1>
  <div class="markdown level0 summary"><p>Utility class that helps creating an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.icommand">ICommand</a> from the delegates execute and canExecute.</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"><span class="xref">C1DelegateCommand</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.icommand">ICommand</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.html">C1.WPF</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.4.6.2.dll</h6>
  <h5 id="C1_WPF_C1DelegateCommand_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class C1DelegateCommand : ICommand</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class C1DelegateCommand
    Implements ICommand</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_C1DelegateCommand__ctor_System_Action_System_Object__" data-uid="C1.WPF.C1DelegateCommand.#ctor(System.Action{System.Object})">
          <a class="xref" href="C1.WPF.C1DelegateCommand.-ctor.html#C1_WPF_C1DelegateCommand__ctor_System_Action_System_Object__">C1DelegateCommand(Action&lt;object&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.WPF.C1DelegateCommand.html">C1DelegateCommand</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1DelegateCommand__ctor_System_Action_System_Object__System_Predicate_System_Object__" data-uid="C1.WPF.C1DelegateCommand.#ctor(System.Action{System.Object},System.Predicate{System.Object})">
          <a class="xref" href="C1.WPF.C1DelegateCommand.-ctor.html#C1_WPF_C1DelegateCommand__ctor_System_Action_System_Object__System_Predicate_System_Object__">C1DelegateCommand(Action&lt;object&gt;, Predicate&lt;object&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.WPF.C1DelegateCommand.html">C1DelegateCommand</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <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_C1DelegateCommand_CanExecute_System_Object_" data-uid="C1.WPF.C1DelegateCommand.CanExecute(System.Object)">
          <a class="xref" href="C1.WPF.C1DelegateCommand.CanExecute.html#C1_WPF_C1DelegateCommand_CanExecute_System_Object_">CanExecute(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Defines the method that determines whether the command can execute in its current state.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1DelegateCommand_Execute_System_Object_" data-uid="C1.WPF.C1DelegateCommand.Execute(System.Object)">
          <a class="xref" href="C1.WPF.C1DelegateCommand.Execute.html#C1_WPF_C1DelegateCommand_Execute_System_Object_">Execute(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Defines the method to be called when the command is invoked.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1DelegateCommand_RaiseCanExecuteChanged" data-uid="C1.WPF.C1DelegateCommand.RaiseCanExecuteChanged">
          <a class="xref" href="C1.WPF.C1DelegateCommand.RaiseCanExecuteChanged.html#C1_WPF_C1DelegateCommand_RaiseCanExecuteChanged">RaiseCanExecuteChanged()</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <see cref="e:CanExecuteChanged"></see> event.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_C1DelegateCommand_CanExecuteChanged" data-uid="C1.WPF.C1DelegateCommand.CanExecuteChanged">
          <a class="xref" href="C1.WPF.C1DelegateCommand.CanExecuteChanged.html">CanExecuteChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when changes occur that affect whether or not the command should execute.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
