private static void OnIsModalPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ChildWindow childWindow = d as ChildWindow; if (childWindow != null) { childWindow.OnIsModalChanged(( bool )e.OldValue, ( bool )e.NewValue); } }