<p>In WPF, there are two ways to set the focus to an element.<br>
You can either call the .Focus() method of the input element, or call Keyboard.Focus() with the input element as parameter.</p>

<pre><code>// first way:
item.Focus();
// alternate way:
Keyboard.Focus(item);
</code></pre>

<p>What is the difference between these two? Are there special reasons to use one of them instead of the other in some cases?<br>
So far I noticed no difference - what ever method I used, the item always got logical focus as well as keyboard focus.</p>

As per
WPF documentation on MSDN
:
In WPF there are two main concepts that pertain to focus: keyboard focus and logical focus. Keyboard focus refers to the element that receives keyboard input and logical focus refers to the element in a focus scope that has focus.
and
An element that has keyboard focus will also have logical focus, but an element that has logical focus does not necessarily have keyboard focus.