Using WPF DataGridHyperLinkColumn Items to open Windows Explorer and open files

1 <DataGridHyperlinkColumn Binding="{Binding Link}">
2     <DataGridHyperlinkColumn.ElementStyle>
3         <Style>
4             <EventSetter Event="Hyperlink.Click" Handler="DG_Hyperlink_Click"/>
5         </Style>
6     </DataGridHyperlinkColumn.ElementStyle>
7 </DataGridHyperlinkColumn>

or

1 <DataGrid.Resources>
2     <Style TargetType="Hyperlink">
3         <EventSetter Event="Click" Handler="DG_Hyperlink_Click"/>
4     </Style>
5 </DataGrid.Resources>

link http://stackoverflow.com/questions/5764951/using-wpf-datagridhyperlinkcolumn-items-to-open-windows-explorer-and-open-files

你可能感兴趣的:(datagrid)