public void RegisterOverlay(Widget widget) { if (widget != null && !Overlays.Contains(widget)) { Overlays.Add(widget); } }