Questa documentazione è stata archiviata e non viene gestita.

Classe Hyperlink

An inline-level flow content element that provides facilities for hosting hyperlinks within flow content.

Spazio dei nomi: System.Windows.Documents
Assembly: PresentationFramework (in presentationframework.dll)
Spazio dei nomi XML:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public class Hyperlink : Span, ICommandSource, IUriContext
public class Hyperlink extends Span implements ICommandSource, IUriContext
public class Hyperlink extends Span implements ICommandSource, IUriContext
<Hyperlink>
  Inlines
</Hyperlink>

Content Model: Hyperlink enforces a strong content model for child content. See TextElement Content Model Overview for more information about the Hyperlink content model.

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);

System.Object
   System.Windows.Threading.DispatcherObject
     System.Windows.DependencyObject
       System.Windows.ContentElement
         System.Windows.FrameworkContentElement
           System.Windows.Documents.TextElement
             System.Windows.Documents.Inline
               System.Windows.Documents.Span
                System.Windows.Documents.Hyperlink

I membri statici pubblici (Shared in Visual Basic) di questo tipo sono validi per le operazioni multithreading. I membri di istanza non sono garantiti come thread safe.

Microsoft .NET Framework 3.0 è supportato in Windows Vista, Microsoft Windows XP SP2 e Windows Server 2003 SP1.

.NET Framework

Supportato in:
Mostra: