tags:

views:

416

answers:

2

ViewStack in Flex/MXML is a container/panel control that holds multiple children but only makes one visible at a time, useful for implementing your own tab-style controls. Does WPF/Xaml have a class that works the same as this? I know it has its own dedicated tab control (what I'm trying to do isn't really a tab control, so not useful) and StackPanel, which isn't the same.

+2  A: 

A) Use a grid, and toggle the Visibility property (multiple UIElements can be in one cell in a grid B) Use a tab control, but restyle it as you see fit C) Swap out the actual Content property in a ContentPresenter -- e.g. shove the instance of the UI you want into it, when you want it in it.

dhopton
D) Write a custom control in about 2 mintues to switch between a collection of child content.
Phil Wright
A: 

IMO, templating any ItemsControl is the easiest way if you don't want to write a custom control.

E.g. have some inner panel's visibility in item's container bound to the IsSelected property's value (through BooleanToVisibilityConverter).

arconaut