Invalidating a canvas in the other view of an iPad split view

I’m writing an app for the iPad that has a split view. The view on the right has a canvas (MapView) and the view on the left (ConfigView) has numbers (in text boxes and sliders) that determine exactly what you see in the canvas. I would like to be able to change the numbers in the configView and have the changes immediately reflected in the canvas of the MapView. The MapView has a Paint event in the canvas that does all of the drawing. If I put code in the change event of a ConfigView textbox like:

Dim v as new MapView // because you can’t do MapView.Canvas1.Invalidate
v.Canvas1.Invalidate

The canvas is not refreshed until I tap and drag in the MapView. There must be some way to get the canvas in the mapView to invalidate immediately when a change is made in the configView or vice versa (e.g., tap a point in the MapView and show the coordinates in the appropriate textbox of the ConfigView. It seems like I must be missing something easy.

You can do this either with a delegate or a class interface

Delegate
In MapView or even in a module add a new Delegate named RefreshDelegate
In MapView add a method named RefreshCanvas
Add one line of code:

Canvas1.Invalidate

In ConfigView add a property:

SplitCallback as MapView.RefreshDelegate

In the Activate event of ConfigView the following code should work:

me.SplitCallback = WeakAddressOf MapView(self.parentSplitView.Detail).RefreshCanvas

Whenever something is changed in ConfigView just call:

self.SplitCallback.Invoke

Interface
In your project add a new class interface named RefreshInterface with one method:

RefreshCanvas

Add that interface to MapView

Whenever something is changed in ConfigView just call:

if self.parentSplitView.Detail isa RefreshInterface then
RefreshInterface(self.parentSplitView.Detail).RefreshInterface
End If

Thanks, Jrmie, the delegate method worked great! I’m sure the Interface approach would work well, too. This is my first iPad split view project and I really appreciate your guidance.