title: Focus changed on LoadMore Button click in Windows Phone Application Page
body: <p>In my Windows Phone application I have a ListBox with Load More button, in one of my pages. At the bottom of the page a TextBox and a button is present. when I click on the Load More button  at the bottom of listbox, the focus automatically goes to the textbox and the keypad is shown. I don't need to go the focus to the textbox on buttonclick. How this problem occures and how can I overcome this problem. </p>
  
  <p>The xaml of style used for the listbox shown below</p>
  
  <pre><code>&lt;phone:PhoneApplicationPage.Resources&gt;
      &lt;Style x:Key="ListBoxMore" TargetType="ListBox"&gt;
          &lt;Setter Property="Background" Value="Transparent"/&gt;
          &lt;Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/&gt;
          &lt;Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/&gt;
          &lt;Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Visible"/&gt;
          &lt;Setter Property="BorderThickness" Value="0"/&gt;
          &lt;Setter Property="BorderBrush" Value="Transparent"/&gt;
          &lt;Setter Property="Padding" Value="0"/&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="ListBox"&gt;
                      &lt;ScrollViewer x:Name="ScrollViewer"&gt;
                          &lt;StackPanel&gt;
                          &lt;ItemsPresenter/&gt;
                              &lt;Border BorderBrush="Black" BorderThickness="0,0.5"&gt;
                                  &lt;Button Content="Load More..." Name="btnLoadMore" Visibility="Visible" Background="White" Foreground="#FF176DDC" Click="btnLoadMore_Click"&gt;&lt;/Button&gt;
                              &lt;/Border&gt;
                          &lt;/StackPanel&gt;
                      &lt;/ScrollViewer&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  &lt;/phone:PhoneApplicationPage.Resources&gt;
  </code></pre>
  
  <p>The xaml of the listbox shown below</p>
  
  <pre><code>&lt;ListBox x:Name="userDetailsList" SelectionMode="Multiple" Style="{StaticResource ListBoxMore}"&gt;
      &lt;ListBox.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;StackPanel Orientation="Horizontal"&gt;
                  &lt;Border BorderThickness="0,0.5,0,0" BorderBrush="Black" Width="440"&gt;
                      &lt;Grid Width="430"&gt;
                          &lt;Image Source="{Binding UserImage}"/&gt;
                          &lt;TextBlock Text="{Binding UserName}"/&gt;
                          &lt;TextBlock Text="{Binding Details}"/&gt;
                          &lt;TextBlock Text="{Binding Date}"/&gt;
                      &lt;/Grid&gt;
                  &lt;/Border&gt;
              &lt;/StackPanel&gt;
          &lt;/DataTemplate&gt;
      &lt;/ListBox.ItemTemplate&gt;
  &lt;/ListBox&gt;
  </code></pre>
  
  <p>When I click on loadmore button the focus goes to the textbox that placed below the listbox. There is only one textbox is there.</p>