private static void OnContentChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) { ((ModernPopup)o).OnContentChanged(e.OldValue as FrameworkElement, e.NewValue as FrameworkElement); }