title: Set DataTemplate for a specific item in an ItemsControl
body: <p>I have an <code>ItemsControl</code> that contains a collection of items that are shown at a page. 
  The <code>ItemsControl</code> has an <code>ItemTemplate</code> property which is set to certain DataTemplate resource. </p>
  
  <pre><code>&lt;DataTemplate x:Key="SimpleTemplate"&gt;
          &lt;!-- .... --&gt;
  &lt;/DataTemplate&gt;
  
  &lt;DataTemplate x:Key="ComplexTemplate"&gt;
          &lt;!-- .... --&gt;
  &lt;/DataTemplate&gt;
  ...............................
  &lt;ItemsControl 
        x:Name="MainCanvas"
        DataContext="{StaticResource mainItems}"
        ItemsSource="{Binding Path=Buttons}"
        ItemTemplate="{StaticResource SimpleTemplate}"
  &gt;
  
        &lt;ItemsControl.ItemsPanel&gt;
             &lt;ItemsPanelTemplate&gt;
                   &lt;Canvas Width="4000" Height="4000" /&gt;
             &lt;/ItemsPanelTemplate&gt;                       
        &lt;/ItemsControl.ItemsPanel&gt;
  
  &lt;/ItemsControl&gt; 
  </code></pre>
  
  <p>Is it possible to change DataTemplate for a one specific item in my ItemsControl programmatically?   </p>