In the Datagrid column there are links that are formed from the 3 class properties, but nothing is done by clicking on the link.
Xaml:
<DataGridTemplateColumn Header="Имя"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock> <Hyperlink NavigateUri="{Binding Uid, StringFormat=}http://site.com/profile/{0}}" RequestNavigate="Hyperlink_RequestNavigate"> <Run Text="{Binding First_name}"/><Run Text="{Binding Last_name}"/> </Hyperlink> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> code-behind:
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri)); e.Handled = true; } What is the problem?
UPD: I read that Datagrid has a datagridhyperlinkcolumn column for links, but as I understand it, it cannot be formed from several elements.