title: WPF TextBox Styling - Disable scrolling?
body: <p>it's my first question here so be gentle haha</p>
  <p>I am using a WPF TextBox Element to enter some user information, in this example it's a username.
  My problem with this is that I am able to scroll within the TextBox which I don't want, as it just looks terrible even if it is just a bit.</p>
  <p>So I am looking for an option to turn the scrolling off. As you can see I am using a ScrollViewer, as the documentation suggests but if there are any other options for styling the TextBox I am more then willing to try :D
  Thanks in advance.</p>
  <pre><code>&lt;Style TargetType=&quot;{x:Type TextBox}&quot;
         x:Key=&quot;textBox1&quot;&gt;
      &lt;Setter Property=&quot;Template&quot;&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType=&quot;{x:Type TextBox}&quot;&gt;
                  &lt;Border CornerRadius=&quot;16&quot;
                          Background=&quot;{TemplateBinding Background}&quot;&gt;
                      &lt;ScrollViewer Margin=&quot;10,7.5&quot;
                                    x:Name=&quot;PART_ContentHost&quot;/&gt;
  
                  &lt;/Border&gt;
              &lt;/ControlTemplate&gt;
  
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  </code></pre>
  <p>=&gt; This is the Style of the TextBox in a RessourceDic.</p>
  <pre><code>&lt;StackPanel Grid.Column=&quot;0&quot; Grid.Row=&quot;1&quot; Grid.ColumnSpan=&quot;2&quot;&gt;
          &lt;Grid Height=&quot;250&quot;/&gt;
          
  
          &lt;TextBlock x:Name=&quot;Error&quot;
                     FontSize=&quot;14&quot;
                     Foreground=&quot;DarkRed&quot;
                     FontWeight=&quot;Bold&quot;
                     Margin=&quot;5&quot;
                     TextWrapping=&quot;Wrap&quot;/&gt;
  
          &lt;TextBlock Text=&quot;Benutzername&quot; Margin=&quot;15,0,0,10&quot; FontSize=&quot;20&quot;/&gt;
          &lt;TextBox Margin=&quot;0,0,20,0&quot;
                   Background=&quot;#F2E3D5&quot;
                   x:Name=&quot;Username&quot;
                   Style=&quot;{StaticResource textBox1}&quot;
                   Width=&quot;230&quot;
                   Height=&quot;35&quot;
                   FontSize=&quot;21&quot;&gt;
             
          &lt;/TextBox&gt;
          &lt;TextBlock Text=&quot;Passwort&quot; Margin=&quot;15,20,0,10&quot; FontSize=&quot;20&quot;/&gt;
          &lt;PasswordBox Margin=&quot;0,0,20,0&quot;
                       Background=&quot;#F2E3D5&quot;
                       x:Name=&quot;Password&quot;
                       Style=&quot;{StaticResource passwordBox1}&quot;
                       FontSize=&quot;21&quot;&gt;
  
          &lt;/PasswordBox&gt;
  
          &lt;Button x:Name=&quot;LogIn&quot; Height=&quot;40&quot; Width=&quot;120&quot; Style=&quot;{StaticResource LogInBTN}&quot; Foreground=&quot;Black&quot; Margin=&quot;0,30,0,0&quot; Click=&quot;LogInBTN_Click&quot;&gt;
  
              &lt;Button.Content&gt;
                  &lt;StackPanel Orientation=&quot;Horizontal&quot;&gt;
                      &lt;Image Source=&quot;images/user.png&quot; Height=&quot;25&quot; Width=&quot;25&quot; VerticalAlignment=&quot;Center&quot;/&gt;
                      &lt;TextBlock Text=&quot;Einloggen&quot; Margin=&quot;10,2,0,0&quot; VerticalAlignment=&quot;Center&quot;/&gt;
                  &lt;/StackPanel&gt;
              &lt;/Button.Content&gt;
  
          &lt;/Button&gt;
  
          &lt;TextBlock Margin=&quot;0,20,0,0&quot; Height=&quot;20&quot; Width=&quot;250&quot; Text=&quot;X - Passwort nicht korrekt&quot; TextAlignment=&quot;Center&quot; FontSize=&quot;16&quot; Foreground=&quot;Red&quot; Visibility=&quot;Hidden&quot;/&gt;
      &lt;/StackPanel&gt;
  </code></pre>
  <p>=&gt; This is the Stackpanel where I use the TextBox.</p>