private static void OnFieldsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ((Popup)d).UpdateTemplate(); }