示例#1
0
        private static void OnStrokeDashTypeChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            StrokeDashType newValue = (StrokeDashType)e.NewValue;
            StrokeDashType oldValue = (StrokeDashType)e.OldValue;

            ((DataPoint)o).OnStrokeDashTypeChanged(oldValue, newValue);
        }
示例#2
0
 public static DoubleCollection GetStrokeDashArray(StrokeDashType dashType)
 {
     DoubleCollection doubleCollection = new DoubleCollection();
     switch (dashType)
     {
         case StrokeDashType.None:
             doubleCollection.Add(0.0);
             doubleCollection.Add(0.0);
             break;
         case StrokeDashType.Solid:
             doubleCollection.Add(1.0);
             doubleCollection.Add(0.0);
             break;
         case StrokeDashType.Dash:
             doubleCollection.Add(5.0);
             doubleCollection.Add(1.0);
             break;
         case StrokeDashType.Dot:
             doubleCollection.Add(2.0);
             doubleCollection.Add(1.0);
             break;
         case StrokeDashType.DashDot:
             doubleCollection.Add(5.0);
             doubleCollection.Add(1.0);
             doubleCollection.Add(2.0);
             doubleCollection.Add(1.0);
             break;
         case StrokeDashType.DashDotDot:
             doubleCollection.Add(5.0);
             doubleCollection.Add(1.0);
             doubleCollection.Add(2.0);
             doubleCollection.Add(1.0);
             doubleCollection.Add(2.0);
             doubleCollection.Add(1.0);
             break;
         case StrokeDashType.LongDash:
             doubleCollection.Add(10.0);
             doubleCollection.Add(2.0);
             break;
         case StrokeDashType.LongDashDot:
             doubleCollection.Add(10.0);
             doubleCollection.Add(2.0);
             doubleCollection.Add(4.0);
             doubleCollection.Add(2.0);
             break;
         case StrokeDashType.LongDashDotDot:
             doubleCollection.Add(10.0);
             doubleCollection.Add(2.0);
             doubleCollection.Add(4.0);
             doubleCollection.Add(2.0);
             doubleCollection.Add(4.0);
             doubleCollection.Add(2.0);
             break;
     }
     return doubleCollection;
 }
示例#3
0
        public static DoubleCollection GetStrokeDashArray(StrokeDashType dashType)
        {
            DoubleCollection doubleCollection = new DoubleCollection();

            switch (dashType)
            {
            case StrokeDashType.None:
                doubleCollection.Add(0.0);
                doubleCollection.Add(0.0);
                break;

            case StrokeDashType.Solid:
                doubleCollection.Add(1.0);
                doubleCollection.Add(0.0);
                break;

            case StrokeDashType.Dash:
                doubleCollection.Add(5.0);
                doubleCollection.Add(1.0);
                break;

            case StrokeDashType.Dot:
                doubleCollection.Add(2.0);
                doubleCollection.Add(1.0);
                break;

            case StrokeDashType.DashDot:
                doubleCollection.Add(5.0);
                doubleCollection.Add(1.0);
                doubleCollection.Add(2.0);
                doubleCollection.Add(1.0);
                break;

            case StrokeDashType.DashDotDot:
                doubleCollection.Add(5.0);
                doubleCollection.Add(1.0);
                doubleCollection.Add(2.0);
                doubleCollection.Add(1.0);
                doubleCollection.Add(2.0);
                doubleCollection.Add(1.0);
                break;

            case StrokeDashType.LongDash:
                doubleCollection.Add(10.0);
                doubleCollection.Add(2.0);
                break;

            case StrokeDashType.LongDashDot:
                doubleCollection.Add(10.0);
                doubleCollection.Add(2.0);
                doubleCollection.Add(4.0);
                doubleCollection.Add(2.0);
                break;

            case StrokeDashType.LongDashDotDot:
                doubleCollection.Add(10.0);
                doubleCollection.Add(2.0);
                doubleCollection.Add(4.0);
                doubleCollection.Add(2.0);
                doubleCollection.Add(4.0);
                doubleCollection.Add(2.0);
                break;
            }
            return(doubleCollection);
        }
示例#4
0
 protected virtual void OnStrokeDashTypeChanged(StrokeDashType oldValue, StrokeDashType newValue)
 {
     this.OnValueChanged("StrokeDashType", (object)oldValue, (object)newValue);
 }
示例#5
0
 protected virtual void OnStrokeDashTypeChanged(StrokeDashType oldValue, StrokeDashType newValue)
 {
     this.OnValueChanged("StrokeDashType", (object)oldValue, (object)newValue);
 }