Using Container.HasFiles to switch views

What would be the best and most reliable way to switch between two views depending on whether a folder contains files or not? One view uses a wraplist while the other uses a panel, so I doubt I could simply use conditional visibility to rearrange everything.

EDIT: Okay, so I see that simply hiding one view will switch to the other, and it’ll remember to switch back to the previous view when the condition changes. I’ll see how that goes.