title: Issue with WPF application and Windows Classic theme
body: <p>I have a user of one of my applications who is getting a exception when he uses the Window Classic theme.The exception occurs with the following code:</p>
  
  <pre><code>    ' Add to listbox and scroll to end
      '
      Dim iLast As UInt32 = lstStatus.Items.Add(theStatus)
  
      If VisualTreeHelper.GetChildrenCount(lstStatus) &gt; 0 Then
          Dim oBorder As Border = VisualTreeHelper.GetChild(lstStatus, 0)
          Dim oScrollViewer As ScrollViewer = VisualTreeHelper.GetChild(oBorder, 0)
          oScrollViewer.ScrollToBottom()
      End If
  </code></pre>
  
  <p>The exception is thrown on the line assigning the return of "GetChild" to a Border variable. With Windows Classic theme the child control returned is a "ClassicBorderDecorator" and there is no cast to a "Border".</p>
  
  <p>The code is attempting to scroll the listbox to the end to ensure the last added item is visible. Is there a way to handle the Classic theme here?</p>
  
  <p>Note my code was based upon an answer to a question here:
  <a href="https://stackoverflow.com/questions/2337822/wpf-listbox-scroll-to-end-automatically">WPF ListBox Scroll to end automatically</a></p>
  
  <p>Sid</p>