怎么给DataTemplate 自定义的button子控件添加点击事件

zhangyonghui2117 2015-01-22 12:07:36

<DataTemplate x:Key="MeetingInfoTemplate">
<Border Width="290" Height="250">
<Border.Background>
<ImageBrush ImageSource="Images/MeetingInfo.png" />
</Border.Background>
<Grid ShowGridLines="False">
<Grid.RowDefinitions>
<RowDefinition Height="32"></RowDefinition>
<RowDefinition Height="36"></RowDefinition>
<RowDefinition Height="130"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
</Grid.RowDefinitions>
<Label FontFamily="微软雅黑" FontSize="16" Grid.Row="0" Content=" 时间:14:00-16:00"/>
<Label FontFamily="微软雅黑" FontSize="16" Grid.Row="1" Content=" 主题:"/>
<Label Content="afsdf\naf" FontFamily="微软雅黑" FontSize="16" Grid.Row="2"/>
<local:ImageButton Margin="100,10,100,0" x:Name="btnExit2" ImagePath="/Images/join_btn.png" Template="{StaticResource ImageButtonTemplate}" Grid.Row="3" 这里写Click行不行? }"/>
</Grid>
</Border>
</DataTemplate>
...全文
90 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧