public FormsView
{
Func<Point, bool> _setInitialTransformationCallBack;
// could hide this behind explicit interface
public void RegisterCallBack(Func<Point, bool> callback)
{
_setInitialTransformationCallBack = callback;
}
public bool SetInitialTransformation(Point screenLocation)
{
return _setInitialTransformationCallBack(screenLocation);
}
}
public abstract class RendererBase
{
public void OnElementChanged(FormsView view)
{
view.RegisterCallBack(SetInitialTransformation);
}
public abstract bool SetInitialTransformation(Point screenLocation);
}