This is a bit of a difficult problem to explain, but I'm hoping it has a reasonably simple resolution.
I am writing a Listbox control in XAML and most of the layout for the ListBox.ItemTemplate laid out in a grid is the same throughout the list. However the listbox is a "Problem Resolver" that picks out anomalies in a list of customer orders and asks the user to make some decision, or change to the data, before allowing it into the postage system which will bill us for despatching a customer's order.
The problem types are described in an enum with three settings, for two out of the three problem statuses I need a text description of the problem (different description for each type of problem and with dynamic data included in the text) and a button, for the last problem type I need a text description and a radiobutton list.
Is there any way to include a sort of switch statement in the XAML which will decide which content to put in the grid cell where the content needs to vary by just telling it what the Enum value is for the problem order?