@@ -8,7 +8,7 @@ public abstract partial class PlotViewBase : BaseTemplatedView<Grid>, IPlotView
88 public event Action UpdateFinished ;
99 public event Action RenderStarted ;
1010 public event Action RenderFinished ;
11-
11+
1212 private int mainThreadId = 1 ;
1313
1414 protected override void OnControlInitialized ( Grid control )
@@ -74,7 +74,7 @@ protected override void OnControlInitialized(Grid control)
7474 /// </summary>
7575 protected PlotViewBase ( )
7676 {
77- this . TrackerDefinitions = new ObservableCollection < TrackerDefinition > ( ) ;
77+ TrackerDefinitions = new ObservableCollection < TrackerDefinition > ( ) ;
7878
7979 DefaultTrackerTemplate = new ControlTemplate ( ( ) =>
8080 {
@@ -84,7 +84,7 @@ protected PlotViewBase()
8484 tc . Content = TrackerControl . DefaultTrackerTemplateContentProvider ( ) ;
8585 return tc ;
8686 } ) ;
87- this . LayoutChanged += this . OnLayoutUpdated ;
87+ SizeChanged += OnSizeUpdated ;
8888 }
8989
9090 /// <summary>
@@ -147,14 +147,14 @@ public void InvalidatePlot(bool updateData = true)
147147 {
148148 return ;
149149 }
150-
150+
151151 UpdateStarted ? . Invoke ( ) ;
152152
153153 lock ( this . ActualModel . SyncRoot )
154154 {
155155 ( ( IPlotModel ) this . ActualModel ) . Update ( updateData ) ;
156156 }
157-
157+
158158 UpdateFinished ? . Invoke ( ) ;
159159
160160 this . BeginInvoke ( this . Render ) ;
@@ -452,7 +452,7 @@ private bool IsInVisualTree()
452452 /// </summary>
453453 /// <param name="sender">The sender.</param>
454454 /// <param name="e">The event args.</param>
455- private void OnLayoutUpdated ( object sender , EventArgs e )
455+ private void OnSizeUpdated ( object sender , EventArgs e )
456456 {
457457 // if we were not in the visual tree the last time we tried to render but are now, we have to render
458458 if ( ! this . isInVisualTree && this . IsInVisualTree ( ) )
0 commit comments