Hyperlink Class
.NET Framework 3.0
An inline-level flow content element that provides facilities for hosting hyperlinks within flow content.
Namespace: System.Windows.Documents
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
The following example shows simple use of a Hyperlink element.
<Paragraph> <Run>Text preceding the hyperlink.</Run> <Hyperlink NavigateUri="http://search.msn.com" > Link text. </Hyperlink> <Run Name="test">Text following the hyperlink.</Run> </Paragraph>
The following example shows how to create a Hyperlink programmatically.
Paragraph parx = new Paragraph(); Run run1 = new Run("Text preceeding the hyperlink."); Run run2 = new Run("Text following the hyperlink."); Run run3 = new Run("Link Text."); Hyperlink hyperl = new Hyperlink(run3); hyperl.NavigateUri = new Uri("http://search.msn.com"); parx.Inlines.Add(run1); parx.Inlines.Add(hyperl); parx.Inlines.Add(run2);
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: