diff --git a/Source/OxyPlot.Maui.Skia/PlotViewBase.cs b/Source/OxyPlot.Maui.Skia/PlotViewBase.cs index 61ceb02..05f7d21 100644 --- a/Source/OxyPlot.Maui.Skia/PlotViewBase.cs +++ b/Source/OxyPlot.Maui.Skia/PlotViewBase.cs @@ -4,6 +4,9 @@ namespace OxyPlot.Maui.Skia; public abstract partial class PlotViewBase : BaseTemplatedView, IPlotView { + public event Action UpdateStarted; + public event Action UpdateFinished; + private int mainThreadId = 1; protected override void OnControlInitialized(Grid control) @@ -138,6 +141,8 @@ public void HideZoomRectangle() /// The update Data. public void InvalidatePlot(bool updateData = true) { + UpdateStarted?.Invoke(); + if (this.ActualModel == null) { return; @@ -371,6 +376,8 @@ protected virtual void RenderOverride() ((IPlotModel)this.ActualModel).Render(this.renderContext, new OxyRect(0, 0, width, height)); } } + + UpdateFinished?.Invoke(); } ///