private static void OnPatternReplaced(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            StreamlineChartBase3D owner = (StreamlineChartBase3D)d;

            var prevValue = e.OldValue as PointSetPattern3D;

            if (prevValue != null)
            {
                prevValue.Changed -= owner.OnPatternChanged;
            }

            var currValue = e.NewValue as PointSetPattern3D;

            if (currValue != null)
            {
                currValue.Changed += owner.OnPatternChanged;
            }

            owner.RebuildUI();
        }
        private static void OnLinesCountReplaced(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            StreamlineChartBase3D owner = (StreamlineChartBase3D)d;

            owner.RebuildUI();
        }