예제 #1
0
        static void OnDrawLinePathPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            TextOnAPath textOnAPath = d as TextOnAPath;

            if (textOnAPath == null)
            {
                return;
            }

            if (e.NewValue == e.OldValue || e.NewValue == null)
            {
                return;
            }

            textOnAPath.Update();
        }
예제 #2
0
        static void OnTextPathPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            TextOnAPath textOnAPath = d as TextOnAPath;

            if (textOnAPath == null)
            {
                return;
            }

            if (e.NewValue == e.OldValue || e.NewValue == null)
            {
                return;
            }

            textOnAPath.TextPath.Transform = null;

            textOnAPath.UpdateSize();
            textOnAPath.Update();
        }
예제 #3
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();
        }
예제 #4
0
        static void OnScaleTextPathPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            TextOnAPath textOnAPath = d as TextOnAPath;

            if (textOnAPath == null)
            {
                return;
            }

            if (e.NewValue == e.OldValue)
            {
                return;
            }

            bool value = (Boolean)e.NewValue;

            if (value == false && textOnAPath.TextPath != null)
            {
                textOnAPath.TextPath.Transform = null;
            }

            textOnAPath.UpdateSize();
            textOnAPath.Update();
        }