# C1.WPF.C1ComboBox.MoveListBox

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_C1ComboBox_MoveListBox_" data-uid="C1.WPF.C1ComboBox.MoveListBox*">MoveListBox Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_C1ComboBox_MoveListBox_" data-uid="C1.WPF.C1ComboBox.MoveListBox*"></a>
<h4 id="C1_WPF_C1ComboBox_MoveListBox_System_Windows_Input_Key_System_Int32_System_Int32__" data-uid="C1.WPF.C1ComboBox.MoveListBox(System.Windows.Input.Key,System.Int32,System.Int32@)">MoveListBox(Key, int, out int)</h4>
<div class="markdown level1 summary"><p>Get the next item in the ListBox when a key is pressed.
You may override this to implement your own keyboard selection strategy.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected virtual bool MoveListBox(Key key, int index, out int newIndex)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Overridable Function MoveListBox(key As Key, index As Integer, ByRef newIndex As Integer) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.key">Key</a></td>
      <td><span class="parametername">key</span></td>
      <td><p>Key that was pressed.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">index</span></td>
      <td><p>index that is currently selected.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">newIndex</span></td>
      <td><p>The new selected index.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>True if it is a handled key.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
