title: WPF Scroll & focus changing problem
body: <p>I am having a problem with scrolling for my WPF application.</p>
  
  <p>Here is the deal. My UI is the following:</p>
  
  <p><img src="https://i.stack.imgur.com/RVy6x.jpg" alt="ScrollViewer"></p>
  
  <p>The role of my application is to act as a central hub for many applications and launch them. An admin can launch a dump recorded by another user.
  Therefore, I have a <code>ListView</code>, showing the application list, which is scrollable if needed.
  I defined a <code>GroupStyle</code> in order to show expanders and emulate a Windows Explorer view.
  Everything works fine, I just have a problem: when scrolling with the mouse wheel, the component in clear blue ("Launch mode") seems to be catching the focus and stop scrolling.
  This means especially that if my mouse is anywhere out of this control, the scrolling is okay. But whenever the mouse enters this control, I can't scroll anymore.
  I tried to modify the property <code>Focusable</code> and set it to <code>False</code> everywhere I could but nothing changed. I'd guess that it is finally not a focus problem.
  Anybody has an idea on how to avoid the scrolling to be caught by the element?</p>
  
  <p>Here is some (simplified, removed some useless properties so as to make it as clear as possible) XAML for the expander's content:</p>
  
  <pre><code>&lt;StackPanel Orientation="Vertical"  VerticalAlignment="Top" &gt;
  
              &lt;ToggleButton&gt;
                  &lt;!-- ToggleButton Content... --&gt;
              &lt;/ToggleButton&gt;
  
              &lt;!-- This is the custom component in which you can see "Launch mode" --&gt;
              &lt;my:UcReleaseChooser &gt;
                  &lt;!-- Properties there. I tried to set Focusable to False, no impact... --&gt;
              &lt;/my:UcReleaseChooser&gt;
  
          &lt;/StackPanel&gt;
  </code></pre>
  
  <p>And the code for <code>UcReleaseChooser</code>:</p>
  
  <pre><code>&lt;StackPanel HorizontalAlignment="Stretch"
                  Focusable="False" ScrollViewer.CanContentScroll="False"&gt;
  
          &lt;ListBox ItemsSource="{Binding ListChosenReleases}" BorderBrush="LightGray" Background="AliceBlue"
                   HorizontalAlignment="Stretch" Focusable="False" ScrollViewer.CanContentScroll="False"&gt;
  
              &lt;ListBox.ItemsPanel&gt;
                  &lt;ItemsPanelTemplate&gt;
                      &lt;StackPanel Orientation="Vertical" 
                                  Focusable="False" ScrollViewer.CanContentScroll="False"/&gt;
                  &lt;/ItemsPanelTemplate&gt;
              &lt;/ListBox.ItemsPanel&gt;
  
              &lt;ListBox.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;DockPanel LastChildFill="True" HorizontalAlignment="Stretch"
                                 Focusable="False" ScrollViewer.CanContentScroll="False"&gt;
                          &lt;TextBlock DockPanel.Dock="Top"
                              HorizontalAlignment="Left" Text="{Binding Key}" 
                                     FontStyle="Italic"/&gt;
                          &lt;ListBox DockPanel.Dock="Bottom"
                              HorizontalAlignment="Right" ItemsSource="{Binding Value}"
                                   BorderBrush="{x:Null}" Background="AliceBlue"
                                   Focusable="False" ScrollViewer.CanContentScroll="False"&gt;
                              &lt;ListBox.ItemsPanel&gt;
                                  &lt;ItemsPanelTemplate&gt;
                                      &lt;UniformGrid Focusable="False"/&gt;
                                  &lt;/ItemsPanelTemplate&gt;
                              &lt;/ListBox.ItemsPanel&gt;
  
                              &lt;ListBox.ItemContainerStyle&gt;
                                  &lt;Style TargetType="{x:Type ListBoxItem}"&gt;
                                      &lt;-- Blah blah about style --&gt;
                                  &lt;/Style&gt;
                              &lt;/ListBox.ItemContainerStyle&gt;
  
  
                              &lt;ListBox.ItemTemplate&gt;
                                  &lt;DataTemplate&gt;
                                      &lt;RadioButton Content="{Binding Key}" Margin="3"
                                              IsChecked="{Binding Path=IsSelected, Mode=TwoWay, 
                                                          RelativeSource={RelativeSource FindAncestor, 
                                                              AncestorType={x:Type ListBoxItem}}}" 
                                                   Focusable="False" ScrollViewer.CanContentScroll="False"/&gt;
                                  &lt;/DataTemplate&gt;
                              &lt;/ListBox.ItemTemplate&gt;
                          &lt;/ListBox&gt;
                      &lt;/DockPanel&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListBox.ItemTemplate&gt;
  
          &lt;/ListBox&gt;
  
      &lt;/StackPanel&gt;
  </code></pre>
  
  <p>As you can see, the <code>UcReleaseChooser</code> contains a list of <code>RadioButton</code> lists. I tried to set <code>Focusable</code> &amp; <code>CanContentScroll</code> to <code>False</code> everywhere it seemed appropriate, but the control keeps preventing the main UI to scroll...</p>
  
  <p>I guess I should change another property... Any idea?</p>
  
  <p>Thanks!</p>