Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an ItemsControl in ItemsSource mode. When I add an item to the source, a usercontrol is created from a datatemplate that corresponds to the item I just added. The ItemsControl uses a canvas as it's ItemsPanel. The problem is that when I inspect my code, I find that the children of my canvas are ContentPresenters, not my UserControl. I would like to be able to access the particular UserControl in the canvas so I can use it's functionality. Can anyone help me with this?
Posted

1 solution

Hello,

You can access the "Content" property of the ContentPresenter to get your content :) !

Hope this help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900