using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Media; using System.Windows.Threading; namespace RealTimeGraphEx.ReachGraphs { public class RealTimeGraphExReachWaveScroll : RealTimeGraphExReachLineScroll { public RealTimeGraphExReachWaveScroll() : base() { } /// /// Set the cross thread fields. /// protected override void OnSetCrossThreadFields() { base.OnSetCrossThreadFields(); this.Dispatcher.Invoke(() => { _minimum = _maximum * -1; }, System.Windows.Threading.DispatcherPriority.Send); } protected override void OnDrawVisuals() { double scale = GetPolygonScaleFactor(); this.Dispatcher.Invoke(() => { Polygon.Points = new PointCollection(graphPolygon.ToReachPolygonPointsWaveFill(_width + 1, _height, scale, ConvertYToImageYFliped)); }, DispatcherPriority.Send); } } }