private static void OnStrokeDashTypeChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) { StrokeDashType newValue = (StrokeDashType)e.NewValue; StrokeDashType oldValue = (StrokeDashType)e.OldValue; ((DataPoint)o).OnStrokeDashTypeChanged(oldValue, newValue); }
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; }
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); }
protected virtual void OnStrokeDashTypeChanged(StrokeDashType oldValue, StrokeDashType newValue) { this.OnValueChanged("StrokeDashType", (object)oldValue, (object)newValue); }