NoWar
NoWar

Reputation: 37633

How to access button under DataTemplate via code behind?

I have got this code and I need to access somehow Button and call its Command.

How it could be done?

Thank you!

<DataTemplate> 
 <Grid>
   <Button  Command="someexternalcontrol:ContentControl1.RotateCommand" Content="Flip"  Visibility="Visible" Height="5" Width="5" />
 </Grid>
</DataTemplate>

Upvotes: 0

Views: 1791

Answers (1)

osaka
osaka

Reputation: 328

Refer the link below . Hope it was helpful. http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/fb16c929-7318-41de-9ef4-fb62cb1bb45f

Upvotes: 2

Related Questions