private void UserControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { if (!bindingInitialized && this.IsVisible) { Binding binding = new Binding("AvailableEditors"); binding.RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(MainWindow), 1); binding.NotifyOnTargetUpdated = true; EditorSelection.SetBinding(ItemsControl.ItemsSourceProperty, binding); bindingInitialized = true; } }