# C1.WPF.Ribbon.C1ButtonTool

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_Ribbon_C1ButtonTool" data-uid="C1.WPF.Ribbon.C1ButtonTool" class="text-break">C1ButtonTool Class
</h1>
  <div class="markdown level0 summary"><p>Control tool that represents a button that performs an action.</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="C1.WPF.Ribbon.C1Tool.html">C1Tool</a></div>
    <div class="level2"><span class="xref">C1ButtonTool</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.icommandsource">ICommandSource</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.Ribbon.html">C1.WPF.Ribbon</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.Ribbon.dll</h6>
  <h5 id="C1_WPF_Ribbon_C1ButtonTool_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[TemplatePart(Name = &quot;Button&quot;, Type = typeof(Button))]
public class C1ButtonTool : C1Tool, ICommandSource</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;TemplatePart(Name:=&quot;Button&quot;, Type:=GetType(Button))&gt;
Public Class C1ButtonTool
    Inherits C1Tool
    Implements ICommandSource</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_Ribbon_C1ButtonTool__ctor" data-uid="C1.WPF.Ribbon.C1ButtonTool.#ctor">
          <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.-ctor.html#C1_WPF_Ribbon_C1ButtonTool__ctor">C1ButtonTool()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.html">C1ButtonTool</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Ribbon_C1ButtonTool_CommandParameterProperty" data-uid="C1.WPF.Ribbon.C1ButtonTool.CommandParameterProperty">
          <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.CommandParameterProperty.html">CommandParameterProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.CommandParameter.html#C1_WPF_Ribbon_C1ButtonTool_CommandParameter">CommandParameter</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Ribbon_C1ButtonTool_CommandProperty" data-uid="C1.WPF.Ribbon.C1ButtonTool.CommandProperty">
          <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.CommandProperty.html">CommandProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.Command.html#C1_WPF_Ribbon_C1ButtonTool_Command">Command</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Ribbon_C1ButtonTool_CommandTargetProperty" data-uid="C1.WPF.Ribbon.C1ButtonTool.CommandTargetProperty">
          <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.CommandTargetProperty.html">CommandTargetProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.CommandTarget.html#C1_WPF_Ribbon_C1ButtonTool_CommandTarget">CommandTarget</a> dependency property.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Ribbon_C1ButtonTool_Command" data-uid="C1.WPF.Ribbon.C1ButtonTool.Command">
          <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.Command.html#C1_WPF_Ribbon_C1ButtonTool_Command">Command</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the command that can be bound to the tool.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Ribbon_C1ButtonTool_CommandParameter" data-uid="C1.WPF.Ribbon.C1ButtonTool.CommandParameter">
          <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.CommandParameter.html#C1_WPF_Ribbon_C1ButtonTool_CommandParameter">CommandParameter</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets command parameter.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Ribbon_C1ButtonTool_CommandTarget" data-uid="C1.WPF.Ribbon.C1ButtonTool.CommandTarget">
          <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.CommandTarget.html#C1_WPF_Ribbon_C1ButtonTool_CommandTarget">CommandTarget</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets command target.</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_Ribbon_C1ButtonTool_Dispose_System_Boolean_" data-uid="C1.WPF.Ribbon.C1ButtonTool.Dispose(System.Boolean)">
          <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.Dispose.html#C1_WPF_Ribbon_C1ButtonTool_Dispose_System_Boolean_">Dispose(bool)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_Ribbon_C1ButtonTool_Execute_System_Object_" data-uid="C1.WPF.Ribbon.C1ButtonTool.Execute(System.Object)">
          <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.Execute.html#C1_WPF_Ribbon_C1ButtonTool_Execute_System_Object_">Execute(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Called when the tool is executed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Ribbon_C1ButtonTool_OnApplyTemplate" data-uid="C1.WPF.Ribbon.C1ButtonTool.OnApplyTemplate">
          <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.OnApplyTemplate.html#C1_WPF_Ribbon_C1ButtonTool_OnApplyTemplate">OnApplyTemplate()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_Ribbon_C1ButtonTool_OnClick" data-uid="C1.WPF.Ribbon.C1ButtonTool.OnClick">
          <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.OnClick.html#C1_WPF_Ribbon_C1ButtonTool_OnClick">OnClick()</a>
        </td>
        <td class="markdown level1 summary"></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_Ribbon_C1ButtonTool_Click" data-uid="C1.WPF.Ribbon.C1ButtonTool.Click">
          <a class="xref" href="C1.WPF.Ribbon.C1ButtonTool.Click.html">Click</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the tool is clicked, either through the menu or the control itself.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
