UserControl/Control : how to get a reference to an element of the temp

added by jmix90
9/15/2010 3:47:43 AM

62 Views

When you want to create your own custom control you have two choices : creates an UserControl or inherits from one of the "Control's classes" (ContentControl, ItemsControls or Control itself). When doing so you'll surely need to access to the visual parts of your template from the code to add it a nice behavior. In this post we'll discover how to access the template children by using the FindName method even on UserControl.


0 comments