title: How to create WPF ControlTemplate?
body: <p>I am trying to create linkbutttonlike like said in answer here: <a href="https://stackoverflow.com/questions/5122334/how-do-i-make-a-wpf-button-look-like-a-link">How do I make a WPF button look like a link?</a></p>
  <ol>
  <li>I created UserControl, default xaml looking like that:</li>
  </ol>
  <pre><code>&lt;UserControl x:Class=&quot;Wpf.Controls.HyperlinkLikeButtonTemplate&quot;
               xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
               xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
               xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot; 
               xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot; 
               mc:Ignorable=&quot;d&quot; 
               d:DesignHeight=&quot;300&quot; d:DesignWidth=&quot;300&quot;&gt;
      &lt;Grid&gt;
              
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  <ol start="2">
  <li><p>I placed <code>ControlTemplate</code> inside:</p>
  <p></p>
  <pre><code>     &lt;ControlTemplate x:Key=&quot;HyperlinkLikeButtonTemplate&quot; TargetType=&quot;{x:Type Button}&quot;&gt;
           &lt;TextBlock x:Name=&quot;innerText&quot; Foreground=&quot;{DynamicResource {x:Static SystemColors.HotTrackBrushKey}}&quot; Cursor=&quot;Hand&quot; &gt;
       &lt;ContentPresenter /&gt;
           &lt;/TextBlock&gt;
           &lt;ControlTemplate.Triggers&gt;
               &lt;Trigger Property=&quot;Button.IsMouseOver&quot; Value=&quot;true&quot;&gt;
                   &lt;Setter TargetName=&quot;innerText&quot; Property=&quot;Foreground&quot; Value=&quot;{DynamicResource {x:Static SystemColors.HighlightBrushKey}}&quot; /&gt;
                   &lt;Setter TargetName=&quot;innerText&quot; Property=&quot;TextDecorations&quot; Value=&quot;Underline&quot; /&gt;
               &lt;/Trigger&gt;
           &lt;/ControlTemplate.Triggers&gt;
       &lt;/ControlTemplate&gt;
  
       &lt;Style x:Key=&quot;HyperlinkLikeButton&quot; TargetType=&quot;{x:Type Button}&quot;&gt;
           &lt;Setter Property=&quot;Template&quot; Value=&quot;{StaticResource HyperlinkLikeButtonTemplate}&quot; /&gt;
       &lt;/Style&gt;
  </code></pre>
   
  </li>
  </ol>
  <p>But I am getting error</p>
  <blockquote>
  <p>The property &quot;Content&quot; can only be set once.</p>
  </blockquote>
  <p>What I am doing wrong?</p>