嗨,我想用一個MouseDoubleClick事件給我的DataGridTemplateColumn,對於H.Column下的功能 - 和Processinterface-行。如何將MouseDoubleClick-事件綁定到DataGridTemplateColumn
但沒有MouseDoubleClick-事件DataGridTemplateColumn。 任何人都可以幫忙!
這是我的代碼:
<DataGridTemplateColumn x:Name="" Header="H." Width="50">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Path=ObjectType}" Value="E">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=ObjectType}" Value="Function">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=ObjectType}" Value= "Processinterface">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=ObjectType}" Value="AND">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=ObjectType}" Value="OR">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=ObjectType}" Value="XOR">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
</DataTemplate.Triggers>
<Button Name="btnTable" Visibility="Hidden" Height="20" Width="25" Click="Button_Table_Click">
<Image Height="16" Source="" Stretch="Fill" Width="16"/>
</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
感謝名單了很多!!!!! – User1979 2012-08-14 13:18:42