# C1.WPF.C1MessageBoxContent

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_C1MessageBoxContent" data-uid="C1.WPF.C1MessageBoxContent" class="text-break">C1MessageBoxContent Class
</h1>
  <div class="markdown level0 summary"><p>Control that displays the content of a message box. It's meant to be used inside a <span class="xref">C1.Silverlight.C1Window</span>.</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"><span class="xref">C1MessageBoxContent</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>
  <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_C1MessageBoxContent_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[TemplatePart(Name = &quot;Buttons&quot;, Type = typeof(Panel))]
[TemplatePart(Name = &quot;Icon&quot;, Type = typeof(Image))]
[TemplateVisualState(Name = &quot;Warning&quot;, GroupName = &quot;IconStates&quot;)]
[TemplateVisualState(Name = &quot;Error&quot;, GroupName = &quot;IconStates&quot;)]
[TemplateVisualState(Name = &quot;Question&quot;, GroupName = &quot;IconStates&quot;)]
[TemplateVisualState(Name = &quot;Information&quot;, GroupName = &quot;IconStates&quot;)]
[TemplateVisualState(Name = &quot;Normal&quot;, GroupName = &quot;IconStates&quot;)]
[TemplateVisualState(Name = &quot;MouseOver&quot;, GroupName = &quot;CommonStates&quot;)]
[TemplateVisualState(Name = &quot;Disabled&quot;, GroupName = &quot;CommonStates&quot;)]
[StyleTypedProperty(Property = &quot;ButtonStyle&quot;, StyleTargetType = typeof(Button))]
public class C1MessageBoxContent : Control, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;TemplatePart(Name:=&quot;Buttons&quot;, Type:=GetType(Panel))&gt;
&lt;TemplatePart(Name:=&quot;Icon&quot;, Type:=GetType(Image))&gt;
&lt;TemplateVisualState(Name:=&quot;Warning&quot;, GroupName:=&quot;IconStates&quot;)&gt;
&lt;TemplateVisualState(Name:=&quot;Error&quot;, GroupName:=&quot;IconStates&quot;)&gt;
&lt;TemplateVisualState(Name:=&quot;Question&quot;, GroupName:=&quot;IconStates&quot;)&gt;
&lt;TemplateVisualState(Name:=&quot;Information&quot;, GroupName:=&quot;IconStates&quot;)&gt;
&lt;TemplateVisualState(Name:=&quot;Normal&quot;, GroupName:=&quot;IconStates&quot;)&gt;
&lt;TemplateVisualState(Name:=&quot;MouseOver&quot;, GroupName:=&quot;CommonStates&quot;)&gt;
&lt;TemplateVisualState(Name:=&quot;Disabled&quot;, GroupName:=&quot;CommonStates&quot;)&gt;
&lt;StyleTypedProperty(Property:=&quot;ButtonStyle&quot;, StyleTargetType:=GetType(Button))&gt;
Public Class C1MessageBoxContent
    Inherits Control
    Implements IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient</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_C1MessageBoxContent__ctor" data-uid="C1.WPF.C1MessageBoxContent.#ctor">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.-ctor.html#C1_WPF_C1MessageBoxContent__ctor">C1MessageBoxContent()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of a <a class="xref" href="C1.WPF.C1MessageBoxContent.html">C1MessageBoxContent</a>.</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_C1MessageBoxContent_ButtonProperty" data-uid="C1.WPF.C1MessageBoxContent.ButtonProperty">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.ButtonProperty.html">ButtonProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1MessageBoxContent.Button.html#C1_WPF_C1MessageBoxContent_Button">Button</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_ButtonStyleProperty" data-uid="C1.WPF.C1MessageBoxContent.ButtonStyleProperty">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.ButtonStyleProperty.html">ButtonStyleProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1MessageBoxContent.ButtonStyle.html#C1_WPF_C1MessageBoxContent_ButtonStyle">ButtonStyle</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_CancelTextProperty" data-uid="C1.WPF.C1MessageBoxContent.CancelTextProperty">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.CancelTextProperty.html">CancelTextProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1MessageBoxContent.CancelText.html#C1_WPF_C1MessageBoxContent_CancelText">CancelText</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_IconProperty" data-uid="C1.WPF.C1MessageBoxContent.IconProperty">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.IconProperty.html">IconProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1MessageBoxContent.Icon.html#C1_WPF_C1MessageBoxContent_Icon">Icon</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_MessageProperty" data-uid="C1.WPF.C1MessageBoxContent.MessageProperty">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.MessageProperty.html">MessageProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1MessageBoxContent.Message.html#C1_WPF_C1MessageBoxContent_Message">Message</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_NoTextProperty" data-uid="C1.WPF.C1MessageBoxContent.NoTextProperty">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.NoTextProperty.html">NoTextProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1MessageBoxContent.NoText.html#C1_WPF_C1MessageBoxContent_NoText">NoText</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_OKTextProperty" data-uid="C1.WPF.C1MessageBoxContent.OKTextProperty">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.OKTextProperty.html">OKTextProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1MessageBoxContent.OKText.html#C1_WPF_C1MessageBoxContent_OKText">OKText</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_YesTextProperty" data-uid="C1.WPF.C1MessageBoxContent.YesTextProperty">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.YesTextProperty.html">YesTextProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1MessageBoxContent.YesText.html#C1_WPF_C1MessageBoxContent_YesText">YesText</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_C1MessageBoxContent_Button" data-uid="C1.WPF.C1MessageBoxContent.Button">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.Button.html#C1_WPF_C1MessageBoxContent_Button">Button</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a <a class="xref" href="C1.WPF.C1MessageBoxButton.html">C1MessageBoxButton</a> specifying which buttons are displayed in the message box.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_ButtonStyle" data-uid="C1.WPF.C1MessageBoxContent.ButtonStyle">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.ButtonStyle.html#C1_WPF_C1MessageBoxContent_ButtonStyle">ButtonStyle</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the style applied to the message box's buttons.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_CancelText" data-uid="C1.WPF.C1MessageBoxContent.CancelText">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.CancelText.html#C1_WPF_C1MessageBoxContent_CancelText">CancelText</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the text displayed in the Cancel button.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_Icon" data-uid="C1.WPF.C1MessageBoxContent.Icon">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.Icon.html#C1_WPF_C1MessageBoxContent_Icon">Icon</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a <a class="xref" href="C1.WPF.C1MessageBoxIcon.html">C1MessageBoxIcon</a> specifying which icon is displayed in the message box.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_Message" data-uid="C1.WPF.C1MessageBoxContent.Message">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.Message.html#C1_WPF_C1MessageBoxContent_Message">Message</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the message text displayed in the message box.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_NoText" data-uid="C1.WPF.C1MessageBoxContent.NoText">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.NoText.html#C1_WPF_C1MessageBoxContent_NoText">NoText</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the text displayed in the No button.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_OKText" data-uid="C1.WPF.C1MessageBoxContent.OKText">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.OKText.html#C1_WPF_C1MessageBoxContent_OKText">OKText</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the text displayed in the OK button.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_YesText" data-uid="C1.WPF.C1MessageBoxContent.YesText">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.YesText.html#C1_WPF_C1MessageBoxContent_YesText">YesText</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the text displayed in the Yes button.</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_C1MessageBoxContent_ChangeVisualStateCommon_System_Boolean_" data-uid="C1.WPF.C1MessageBoxContent.ChangeVisualStateCommon(System.Boolean)">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.ChangeVisualStateCommon.html#C1_WPF_C1MessageBoxContent_ChangeVisualStateCommon_System_Boolean_">ChangeVisualStateCommon(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Updates the current visual state of the Common visual state group to match the object's properties.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_ChangeVisualStateIcon_System_Boolean_" data-uid="C1.WPF.C1MessageBoxContent.ChangeVisualStateIcon(System.Boolean)">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.ChangeVisualStateIcon.html#C1_WPF_C1MessageBoxContent_ChangeVisualStateIcon_System_Boolean_">ChangeVisualStateIcon(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Updates the current visual state of the Icon visual state group to match the object's properties.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_OnApplyTemplate" data-uid="C1.WPF.C1MessageBoxContent.OnApplyTemplate">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.OnApplyTemplate.html#C1_WPF_C1MessageBoxContent_OnApplyTemplate">OnApplyTemplate()</a>
        </td>
        <td class="markdown level1 summary"><p>Builds the visual tree for the <a class="xref" href="C1.WPF.C1MessageBoxContent.html">C1MessageBoxContent</a> control when a new template is applied.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_OnPropertyChanged_System_Windows_DependencyPropertyChangedEventArgs_" data-uid="C1.WPF.C1MessageBoxContent.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.OnPropertyChanged.html#C1_WPF_C1MessageBoxContent_OnPropertyChanged_System_Windows_DependencyPropertyChangedEventArgs_">OnPropertyChanged(DependencyPropertyChangedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Invoked whenever the effective value of any dependency property has been updated.</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_C1MessageBoxContent_ButtonClick" data-uid="C1.WPF.C1MessageBoxContent.ButtonClick">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.ButtonClick.html">ButtonClick</a>
        </td>
        <td class="markdown level1 summary"><p>Event fired when a button is pressed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1MessageBoxContent_IsMouseOverChanged" data-uid="C1.WPF.C1MessageBoxContent.IsMouseOverChanged">
          <a class="xref" href="C1.WPF.C1MessageBoxContent.IsMouseOverChanged.html">IsMouseOverChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Event raised when the <span class="xref">IsMouseOver</span> property has changed.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="C1.WPF.Extensions.FindParent.html#C1_WPF_Extensions_FindParent__1_System_Windows_FrameworkElement_">Extensions.FindParent&lt;T&gt;(FrameworkElement)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.GetAllParents.html#C1_WPF_Extensions_GetAllParents_System_Windows_FrameworkElement_">Extensions.GetAllParents(FrameworkElement)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.GetVisualStateGroup.html#C1_WPF_Extensions_GetVisualStateGroup_System_Windows_FrameworkElement_System_String_">Extensions.GetVisualStateGroup(FrameworkElement, string)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.SetBinding.html#C1_WPF_Extensions_SetBinding__1_System_Windows_FrameworkElement_System_Windows_DependencyProperty___0_System_Linq_Expressions_Expression_System_Func___0_System_Object___">Extensions.SetBinding&lt;T&gt;(FrameworkElement, DependencyProperty, T, Expression&lt;Func&lt;T, object&gt;&gt;)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.SetBinding.html#C1_WPF_Extensions_SetBinding__1_System_Windows_FrameworkElement_System_Windows_DependencyProperty___0_System_Linq_Expressions_Expression_System_Func___0_System_Object___System_Windows_Data_IValueConverter_">Extensions.SetBinding&lt;T&gt;(FrameworkElement, DependencyProperty, T, Expression&lt;Func&lt;T, object&gt;&gt;, IValueConverter)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.C1TransformToVisual.html#C1_WPF_Extensions_C1TransformToVisual_System_Windows_UIElement_System_Windows_UIElement_">Extensions.C1TransformToVisual(UIElement, UIElement)</a>
  </div>

</div>
