Set element context for view