The Focus behavior is very powerful, but sometimes you just need to focus the first control on a window or control. This can be done by using the FocusFirstControl behavior instead. This behavior will focus the first control on a window or control and has only one property: FocusParentFirst.

Add the following XML namespaces:


Focus when the control is loaded

The easiest and default method is to focus the first control. The parent is also focused by default (just in case if it doesn’t have any focus):

<Window ...>
        <catel:FocusFirstControl />


We would like to thank the following contributors:

Want to contribute to the documentation? We have a guide for that!


Have a question about Catel? Use StackOverflow with the Catel tag!