public void AddItem(IScreenItem item) { Layout.AddItem(item); CalculateRect(); var widget = item as IWidget; if (null != widget) { widget.TransitionObject = TransitionObject; } }
public virtual void AddItem(IScreenItem item) { Layout.AddItem(item); //If the item is a widget, load it's content too. var widget = item as IHasContent; if (null != widget) { widget.LoadContent(this); } }