static void OnFontPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TextOnAPath textOnAPath = d as TextOnAPath; if (textOnAPath == null) { return; } if (e.NewValue == null || e.NewValue == e.OldValue) { return; } textOnAPath.UpdateText(); textOnAPath.Update(); }
static void OnStringPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TextOnAPath textOnAPath = d as TextOnAPath; if (textOnAPath == null) { return; } if (e.NewValue == e.OldValue || e.NewValue == null) { if (textOnAPath._layoutPanel != null) { textOnAPath._layoutPanel.Children.Clear(); } return; } textOnAPath.UpdateText(); textOnAPath.Update(); }