【问题标题】:How to access button under DataTemplate via code behind?如何通过后面的代码访问 DataTemplate 下的按钮?
【发布时间】:2012-05-12 00:30:09
【问题描述】:

我有这个代码,我需要以某种方式访问​​Button 并调用它的Command

怎么做?

谢谢!

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

【问题讨论】:

    标签: c# wpf xaml


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-04-10
      • 2017-02-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-11
      • 2020-08-04
      • 1970-01-01
      相关资源
      最近更新 更多