Cast to User Interface

I am trying to cast just to a widget