<DataGridTemplateColumn Header="位置信息" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Content="查看" Tag="{Binding ElementName=PhoneTextColumn}" x:Name="LocationButton" DataContext="{Binding ElementName=FaUserControl,Path=DataContext}"
Style="{StaticResource NewBtStyle}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<ei:CallMethodAction MethodName="LocationButton_OnClick" TargetObject="{Binding }" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
FaUserControl为整个UserControl
网友评论