void SetupContent (object ob, EventArgs args)
{
widget.Shown -= SetupContent;
if (ContentRequired != null) {
gettingContent = true;
try {
ContentRequired (this, EventArgs.Empty);
} finally {
gettingContent = false;
}
}
widget.UpdateContent ();
widget.Shown += delegate {
UpdateContentVisibleStatus ();
};
widget.Hidden += delegate {
UpdateContentVisibleStatus ();
};
widget.ParentSet += delegate {
UpdateContentVisibleStatus ();
};
UpdateContentVisibleStatus ();
}