title: WPF: PART_ContentHost not scrolling
body: <p>I am trying to make a Log area within my application and the customer has requested the ability to cut/paste the log messages from this area.</p>
  <p>I originally was using the following to setup the log area with scrolling, but this does not allow the user to select &amp; copy text:</p>
  <pre><code>&lt;ScrollViewer DataContext=&quot;{StaticResource Log}&quot;
                Content=&quot;{Binding Appender.Notification}&quot;
                Height=&quot;150&quot;&gt;
      &lt;ScrollViewer.Resources&gt;
          &lt;Style TargetType=&quot;{x:Type ScrollViewer}&quot;&gt;
              &lt;Setter Property=&quot;HorizontalScrollBarVisibility&quot; Value=&quot;Auto&quot; /&gt;
              &lt;Setter Property=&quot;VerticalScrollBarVisibility&quot; Value=&quot;Auto&quot; /&gt;
          &lt;/Style&gt;                    
      &lt;/ScrollViewer.Resources&gt;
  &lt;/ScrollViewer&gt;
  </code></pre>
  <p>I found <a href="http://compilewith.net/2013/02/wpf-read-only-selectable-text.html" rel="nofollow noreferrer">this solution</a> to create a read only TextBox with select-able text:</p>
  <pre><code>    &lt;TextBox Name=&quot;LoggingTextBox&quot;
               Height=&quot;250&quot;
               Width=&quot;950&quot;
               DataContext=&quot;{StaticResource Log}&quot;
               Text=&quot;{Binding Appender.Notification}&quot;
               HorizontalScrollBarVisibility=&quot;Auto&quot;
               VerticalScrollBarVisibility=&quot;Auto&quot;&gt;
          &lt;TextBox.Style&gt;
              &lt;Style TargetType=&quot;TextBox&quot;&gt;
                  &lt;Setter Property=&quot;Template&quot;&gt;
                      &lt;Setter.Value&gt;
                          &lt;ControlTemplate&gt;
                              &lt;Border x:Name=&quot;PART_ContentHost&quot; /&gt;
                          &lt;/ControlTemplate&gt;
                      &lt;/Setter.Value&gt;
                  &lt;/Setter&gt;
              &lt;/Style&gt;
          &lt;/TextBox.Style&gt;
      &lt;/TextBox&gt;
  </code></pre>
  <p>This works to allow the selection of text within the log area but the scrolling does not work.  I added the properties for *ScrollBarVisibility (not in the original solution).</p>
  <p>How can I get the scrolling to work using this TextBox styling?</p>