# C1.WPF.Tile.C1Tile

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_Tile_C1Tile" data-uid="C1.WPF.Tile.C1Tile" class="text-break">C1Tile Class
</h1>
  <div class="markdown level0 summary"><p>The <a class="xref" href="C1.WPF.Tile.C1Tile.html">C1Tile</a> is an animated headered content control which mimics Windows 8 live tiles behavior.</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.Tile.C1TileBase.html">C1TileBase</a></div>
    <div class="level2"><span class="xref">C1Tile</span></div>
      <div class="level3"><a class="xref" href="C1.WPF.Tile.C1SlideTile.html">C1SlideTile</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.Tile.html">C1.WPF.Tile</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.Tile.4.6.2.dll</h6>
  <h5 id="C1_WPF_Tile_C1Tile_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[TemplatePart(Name = &quot;LayoutRoot&quot;, Type = typeof(FrameworkElement))]
[TemplatePart(Name = &quot;contentGrid&quot;, Type = typeof(FrameworkElement))]
[TemplatePart(Name = &quot;ContentChangeAnimation&quot;, Type = typeof(Storyboard))]
[TemplatePart(Name = &quot;ContentPresenter&quot;, Type = typeof(ContentPresenter))]
[TemplatePart(Name = &quot;BackContentPresenter&quot;, Type = typeof(ContentPresenter))]
public class C1Tile : C1TileBase</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;TemplatePart(Name:=&quot;LayoutRoot&quot;, Type:=GetType(FrameworkElement))&gt;
&lt;TemplatePart(Name:=&quot;contentGrid&quot;, Type:=GetType(FrameworkElement))&gt;
&lt;TemplatePart(Name:=&quot;ContentChangeAnimation&quot;, Type:=GetType(Storyboard))&gt;
&lt;TemplatePart(Name:=&quot;ContentPresenter&quot;, Type:=GetType(ContentPresenter))&gt;
&lt;TemplatePart(Name:=&quot;BackContentPresenter&quot;, Type:=GetType(ContentPresenter))&gt;
Public Class C1Tile
    Inherits C1TileBase</code></pre>
  </div>
  <h5 id="C1_WPF_Tile_C1Tile_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>ContentChange storyboards must be defined in the root element resources.
To define multiple ContentChange storyboards, set storyboard Key value to any string starting with
C1Tile.ContentChangeAnimationName.
If control template defines multiple storyboards, the <a class="xref" href="C1.WPF.Tile.C1Tile.html">C1Tile</a> control will run corresponding storyboards randomly.</p>
</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_Tile_C1Tile__ctor" data-uid="C1.WPF.Tile.C1Tile.#ctor">
          <a class="xref" href="C1.WPF.Tile.C1Tile.-ctor.html#C1_WPF_Tile_C1Tile__ctor">C1Tile()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes the new instance of the <a class="xref" href="C1.WPF.Tile.C1Tile.html">C1Tile</a> control.</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_Tile_C1Tile_BackContentProperty" data-uid="C1.WPF.Tile.C1Tile.BackContentProperty">
          <a class="xref" href="C1.WPF.Tile.C1Tile.BackContentProperty.html">BackContentProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.Tile.C1Tile.BackContent.html#C1_WPF_Tile_C1Tile_BackContent">BackContent</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Tile_C1Tile_BackContentTemplateProperty" data-uid="C1.WPF.Tile.C1Tile.BackContentTemplateProperty">
          <a class="xref" href="C1.WPF.Tile.C1Tile.BackContentTemplateProperty.html">BackContentTemplateProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.Tile.C1Tile.BackContentTemplate.html#C1_WPF_Tile_C1Tile_BackContentTemplate">BackContentTemplate</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Tile_C1Tile_ContentSourceProperty" data-uid="C1.WPF.Tile.C1Tile.ContentSourceProperty">
          <a class="xref" href="C1.WPF.Tile.C1Tile.ContentSourceProperty.html">ContentSourceProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.Tile.C1Tile.ContentSource.html#C1_WPF_Tile_C1Tile_ContentSource">ContentSource</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Tile_C1Tile__contentChangeAnimations" data-uid="C1.WPF.Tile.C1Tile._contentChangeAnimations">
          <a class="xref" href="C1.WPF.Tile.C1Tile._contentChangeAnimations.html">_contentChangeAnimations</a>
        </td>
        <td class="markdown level1 summary"><p>Keeps the list of storyboards found in the ControlTemplate.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Tile_C1Tile__root" data-uid="C1.WPF.Tile.C1Tile._root">
          <a class="xref" href="C1.WPF.Tile.C1Tile._root.html">_root</a>
        </td>
        <td class="markdown level1 summary"><p>The root element of the control template visual tree.</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_Tile_C1Tile_BackContent" data-uid="C1.WPF.Tile.C1Tile.BackContent">
          <a class="xref" href="C1.WPF.Tile.C1Tile.BackContent.html#C1_WPF_Tile_C1Tile_BackContent">BackContent</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a> representing the old content of the <a class="xref" href="C1.WPF.Tile.C1Tile.html">C1Tile</a> control.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Tile_C1Tile_BackContentTemplate" data-uid="C1.WPF.Tile.C1Tile.BackContentTemplate">
          <a class="xref" href="C1.WPF.Tile.C1Tile.BackContentTemplate.html#C1_WPF_Tile_C1Tile_BackContentTemplate">BackContentTemplate</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.datatemplate">DataTemplate</a> which should be used as an alternate to the one defined by the ContentTemplate property.
The default value is null.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Tile_C1Tile_ContentSource" data-uid="C1.WPF.Tile.C1Tile.ContentSource">
          <a class="xref" href="C1.WPF.Tile.C1Tile.ContentSource.html#C1_WPF_Tile_C1Tile_ContentSource">ContentSource</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets an object source used to generate the content of the <a class="xref" href="C1.WPF.Tile.C1Tile.html">C1Tile</a> control.</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_Tile_C1Tile_AnimateTileContent" data-uid="C1.WPF.Tile.C1Tile.AnimateTileContent">
          <a class="xref" href="C1.WPF.Tile.C1Tile.AnimateTileContent.html#C1_WPF_Tile_C1Tile_AnimateTileContent">AnimateTileContent()</a>
        </td>
        <td class="markdown level1 summary"><p>If current <a class="xref" href="C1.WPF.Tile.C1Tile.html">C1Tile</a> object is not frozen, runs random storyboard
from the set of storyboards defined in the C1Tile control template which keys are started with &quot;ContentChangeAnimation&quot;.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Tile_C1Tile_C1Tile_SizeChanged_System_Object_System_Windows_SizeChangedEventArgs_" data-uid="C1.WPF.Tile.C1Tile.C1Tile_SizeChanged(System.Object,System.Windows.SizeChangedEventArgs)">
          <a class="xref" href="C1.WPF.Tile.C1Tile.C1Tile_SizeChanged.html#C1_WPF_Tile_C1Tile_C1Tile_SizeChanged_System_Object_System_Windows_SizeChangedEventArgs_">C1Tile_SizeChanged(object, SizeChangedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>The default implementation sets the C1Tile.Clip property so that to clip it on bounds.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Tile_C1Tile_OnApplyTemplate" data-uid="C1.WPF.Tile.C1Tile.OnApplyTemplate">
          <a class="xref" href="C1.WPF.Tile.C1Tile.OnApplyTemplate.html#C1_WPF_Tile_C1Tile_OnApplyTemplate">OnApplyTemplate()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_Tile_C1Tile_OnContentChanged_System_Object_System_Object_" data-uid="C1.WPF.Tile.C1Tile.OnContentChanged(System.Object,System.Object)">
          <a class="xref" href="C1.WPF.Tile.C1Tile.OnContentChanged.html#C1_WPF_Tile_C1Tile_OnContentChanged_System_Object_System_Object_">OnContentChanged(object, object)</a>
        </td>
        <td class="markdown level1 summary"><p>Called when the Content property changes.
This implementation performs next actions:</p>
<ul>
<li>places old content into the BackContentPresenter element,</li>
<li>updates ContentPresenter element with new content,</li>
<li>updates ContentTemplate if BackContentTemplate or ContentTemplateSelector property is set,</li>
<li>runs tile update animation.</li>
</ul>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Tile_C1Tile_OnContentTemplateChanged_System_Windows_DataTemplate_System_Windows_DataTemplate_" data-uid="C1.WPF.Tile.C1Tile.OnContentTemplateChanged(System.Windows.DataTemplate,System.Windows.DataTemplate)">
          <a class="xref" href="C1.WPF.Tile.C1Tile.OnContentTemplateChanged.html#C1_WPF_Tile_C1Tile_OnContentTemplateChanged_System_Windows_DataTemplate_System_Windows_DataTemplate_">OnContentTemplateChanged(DataTemplate, DataTemplate)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_Tile_C1Tile_OnContentTemplateSelectorChanged_System_Windows_Controls_DataTemplateSelector_System_Windows_Controls_DataTemplateSelector_" data-uid="C1.WPF.Tile.C1Tile.OnContentTemplateSelectorChanged(System.Windows.Controls.DataTemplateSelector,System.Windows.Controls.DataTemplateSelector)">
          <a class="xref" href="C1.WPF.Tile.C1Tile.OnContentTemplateSelectorChanged.html#C1_WPF_Tile_C1Tile_OnContentTemplateSelectorChanged_System_Windows_Controls_DataTemplateSelector_System_Windows_Controls_DataTemplateSelector_">OnContentTemplateSelectorChanged(DataTemplateSelector, DataTemplateSelector)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_Tile_C1Tile_UpdateTile" data-uid="C1.WPF.Tile.C1Tile.UpdateTile">
          <a class="xref" href="C1.WPF.Tile.C1Tile.UpdateTile.html#C1_WPF_Tile_C1Tile_UpdateTile">UpdateTile()</a>
        </td>
        <td class="markdown level1 summary"><p>Performs tile update according to the ContentSource property value and the set of defined ContentChangeAnimations.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
