TheĀ HideUntilViewModelLoaded hides (Visibility.Collapsed) any view model container (IViewModelContainer) when it does not have a valid view model. This is a great way to hide lazy-loaded views that should only be visible when they contain an actual view model.

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):

<local:MyUserControl ...>
        <catel:HideUntilViewModelLoaded />


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!