Take the 2-minute tour ×

I would like to display a list of usercontrols binded to a listbox

next to each usercontrol there should be a button

<ListBox ItemsSource="{Binding usercontrollist}">
            <StackPanel Orientation="Horizontal">
                <!--usercontrol of the current binded items-->
                <Button Content="x" HorizontalAlignment="Right"></Button>

How can i do this in xaml code

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Assuming usercontrollist is a collection of UserControl, then you should be able to do this:

<ContentControl Content="{Binding}" />
share|improve this answer
omfg, you are the best. –  Alexander Cosman Mar 2 '12 at 19:55

Your Answer


