static void OnCreateContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BackgroundVisualHost bvh = (BackgroundVisualHost)d; if (bvh.IsContentShowing) { bvh.HideContentHelper(); if (e.NewValue != null) { bvh.CreateContentHelper(); } } }