If parent is a ViewStack and that's the only ViewStack you
have, then parent.selectedChild = detailView should do it. You
could try casting it and see if that works: (parent as
ViewStack).selectedChild = detailView. If (parent as ViewStack)
yields null, then parent is not a ViewStack.
Otherwise you might want to post some sample code.