Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Styles and Temp... » WPF   (RSS)

How do I programmatically interact with template-generated elements? Part II

This post shows you how to find a named element within a DataTemplate. In Part I , we discussed how to find a named element within a ControlTemplate. That was fairly simple; you’d call Template.FindName on the control that the ControlTemplate has been

How do I programmatically interact with template-generated elements? Part I

You may have a scenario that requires you to find an element within a ControlTemplate. To do that, you use Template.FindName. Say you have a simple ControlTemplate for a Button, like the following: < Style TargetType = " {x:Type Button} " > <
 
Page view tracker