Skip to content

Commit

Permalink
Support start/finish rendering events
Browse files Browse the repository at this point in the history
  • Loading branch information
dtatarnikov authored and janusw committed Nov 21, 2023
1 parent 1709137 commit 73d256d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/OxyPlot.Maui.Skia/PlotViewBase.cs
Original file line number Diff line number Diff line change
@@ -4,6 +4,9 @@ namespace OxyPlot.Maui.Skia;

public abstract partial class PlotViewBase : BaseTemplatedView<Grid>, 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()
/// <param name="updateData">The update Data.</param>
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();
}

/// <summary>

0 comments on commit 73d256d

Please sign in to comment.