Skip to content

Commit 73d256d

Browse files
dtatarnikovjanusw
authored andcommitted
Support start/finish rendering events
1 parent 1709137 commit 73d256d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Source/OxyPlot.Maui.Skia/PlotViewBase.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ namespace OxyPlot.Maui.Skia;
44

55
public abstract partial class PlotViewBase : BaseTemplatedView<Grid>, IPlotView
66
{
7+
public event Action UpdateStarted;
8+
public event Action UpdateFinished;
9+
710
private int mainThreadId = 1;
811

912
protected override void OnControlInitialized(Grid control)
@@ -138,6 +141,8 @@ public void HideZoomRectangle()
138141
/// <param name="updateData">The update Data.</param>
139142
public void InvalidatePlot(bool updateData = true)
140143
{
144+
UpdateStarted?.Invoke();
145+
141146
if (this.ActualModel == null)
142147
{
143148
return;
@@ -371,6 +376,8 @@ protected virtual void RenderOverride()
371376
((IPlotModel)this.ActualModel).Render(this.renderContext, new OxyRect(0, 0, width, height));
372377
}
373378
}
379+
380+
UpdateFinished?.Invoke();
374381
}
375382

376383
/// <summary>

0 commit comments

Comments
 (0)