I am building an application which has an ItemsControl, and my DataTemplate for this contains a ContentPresenter. I am binding this ContentPresenter to a UserControl property of my ViewModel. I would like to be able to allow the user to click a button on the UserControl which then shows that UserControl in a new popup window, and then when closed, it reverts back to being in the ItemsControl.
I can get this to show the UserControl in the popup window no problems, but have no idea how to revert it back to being in the ItemsControl.
Any suggestions for this approach would be greatly appreciated.
thanks