Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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();
        }