당신이해야 여기
다음 링크에서 가져온 텍스트입니다 ... 흐름 문서 내에서 하이퍼 링크를 수동으로 흐름 문서를 설정하고 만들어보십시오 :
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/99ae9d9c-1dd4-4acd-8d5d-6eb739adeb98
" 안녕
다음은 단락/절/표에 하이퍼 링크를 만드는 예제입니다.
o 웹 사이트에서 탐색을위한 프레임 컨트롤을 만들 수 있습니다.
public Window1()
{
InitializeComponent();
// add a Frame for navigation
Frame frame = new Frame();
this.Content = frame;
//add FlowDocument
FlowDocument doc = new FlowDocument();
frame.Navigate(doc);
//add Table
Table table = new Table();
doc.Blocks.Add(table);
TableRowGroup group = new TableRowGroup();
table.RowGroups.Add(group);
TableColumn col1 = new TableColumn();
TableColumn col2 = new TableColumn();
table.Columns.Add(col1);
table.Columns.Add(col2);
TableRow row1 = new TableRow();
TableCell cel1 = new TableCell();
row1.Cells.Add(cel1);
group.Rows.Add(row1);
//add Section
Section mySection = new Section();
//add section to the Table cell.
cel1.Blocks.Add(mySection);
Paragraph paraValue = new Paragraph();
Hyperlink hl = new Hyperlink(new Run("Click Here to Google"));
hl.Foreground = Brushes.Red;
paraValue.Inlines.Add(hl);
hl.FontSize = 11;
hl .NavigateUri =new Uri ("Http://www.google.cn");
mySection.Blocks.Add(paraValue);
}
-> FlowDocument -> 표 -> 제 - -> 단락> 하이퍼
코드 숨김
프레임이 예에서 요소의 계층 적 관계는 다음과 같이 인
추가 질문이 있으시면 언제든지 문의하십시오.
감사합니다. 당신이 본격적인 FlowDocument 할 요구 사항이없는 경우 "
고마워, 당신은 HyperLink와 LinkLabel 사이의 차이점을 알고 있습니까? –
그들 사이에 많은 차이가 있습니다. 가장 큰 것은 WinForms이고 다른 하나는 WPF입니다. –