Click here to Skip to main content
15,902,876 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
i've used a button inside a datatemplate.. i'm trying to access it by using TargetName in setter for style... how do u access the button??
please help!!

<DataTemplate x:Key="ExecutionComponentTemplate" >
<c:ExecutionControl ></c:ExecutionControl>

my "executioncontrol" contains a button that i'm trying to access..
Updated 17-Jun-11 6:07am

1 solution

Woops my bad, I thought your code was ASP.NET...

Have a look here for WPF specific ways:
Ways to find controls in WPF[^]
Finding controls in WPF[^]

Don't know of a way to do this in XAML, you might be able to do it with binding.
Share this answer

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

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