3
Shouts

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

posted by jmix90jmix90 617 days, 23 hours, 4 minutes ago
Wednesday, September 15, 2010 8:46:24 AM GMT

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. *

category: Foundation | clicked: 0 | | source: blog.lexique-du-net.com | show counter code
tags: UserControl, UserControls, Control, How-To, WPF, findName, windows presentation foundation, Template, How, Tips, controls

No comments yet, be the first one to post comment.

To post your comment please login or signup