void UnfocusAll (View view) { Layout<View> layoutOfView; ScrollView scrollView; ContentView contentView; if (view == null) return; if ((layoutOfView = view as Layout<View>) != null) { foreach (var child in layoutOfView.Children) UnfocusAll (child); } else if ((scrollView = view as ScrollView) != null) { UnfocusAll (scrollView.Content); } else if ((contentView = view as ContentView) != null) { UnfocusAll (contentView.Content); } else { view.Unfocus (); } }