# HyperlinkDialog Class

> The WPF.HyperlinkDialog class implements a built-in dialog box for inserting and editing a hyperlink at the current text input position. The dialog box inserts either a HypertextLink to an external location or a DocumentLink to a location in the same document. If there is such a link at the current input position, the data of the link is shown and can be edited. Furthermore the hyperlink at the current input position can be deleted. The dialog box can only be opened, if either HypertextLinkCollection.CanAdd returns true or if DocumentLinkCollection.GetItem() or HypertextLinkCollection.GetItem() does not return null. Otherwise, an exception occurs. Each item of the dialog box has a name, available through its Name property, which corresponds with a member of the WPF.HyperlinkDialog.DialogItem enumeration. The FrameworkElement.FindName method can be used to get a certain item and manipulate, move or delete it. The WPF.HyperlinkDialog is a modal dialog box which must be shown with the WPF.HyperlinkDialog.ShowDialog method.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 22.0
- **Namespace:** `TXTextControl.WPF`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.WPF.dll` from the setup
- **Inherits:** `System.Windows.Window`
- **Implements:** `System.Windows.Markup.IComponentConnector`
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > HyperlinkDialog Class
- **975 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/hyperlinkdialog/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/hyperlinkdialog/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/hyperlinkdialog/llms-full.txt

---

### Description

The WPF.HyperlinkDialog class implements a built-in dialog box for inserting and editing a hyperlink at the current text input position. The dialog box inserts either a [HypertextLink](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/hypertextlink/llms-full.txt) to an external location or a [DocumentLink](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documentlink/llms-full.txt) to a location in the same document. If there is such a link at the current input position, the data of the link is shown and can be edited. Furthermore the hyperlink at the current input position can be deleted. The dialog box can only be opened, if either [HypertextLinkCollection.CanAdd](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfieldcollectionbase/canadd-property/llms-full.txt) returns true or if [DocumentLinkCollection.GetItem()](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documentlinkcollection/getitem-method/llms-full.txt) or [HypertextLinkCollection.GetItem()](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/hypertextlinkcollection/getitem-method/llms-full.txt) does not return null. Otherwise, an exception occurs. Each item of the dialog box has a name, available through its Name property, which corresponds with a member of the [WPF.HyperlinkDialog.DialogItem](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/hyperlinkdialog/dialogitem-enumeration/llms-full.txt) enumeration. The `FrameworkElement.FindName` method can be used to get a certain item and manipulate, move or delete it. The WPF.HyperlinkDialog is a modal dialog box which must be shown with the `WPF.HyperlinkDialog.ShowDialog` method.

### Syntax

```csharp
public class HyperlinkDialog : Window, IComponentConnector
```

```vbnet
Public Class HyperlinkDialog
    Inherits Window
    Implements IComponentConnector
```

### Examples

The following example creates an HyperlinkDialog object and shows the dialog box:

```csharp
HyperlinkDialog dlg = new HyperlinkDialog(textControl1);
dlg.ShowDialog();
```

```vbnet
Dim dlg As New HyperlinkDialog(textControl1)
dlg.ShowDialog()
```

The following example creates a Hyperlink Dialog instance and configures its allows transparency setting for a document workflow.

```csharp
TXTextControl.WPF.HyperlinkDialog hyperlinkDialog = new(new TXTextControl.WPF.TextControl());
hyperlinkDialog.AllowsTransparency = true;
```

```vbnet
Dim hyperlinkDialog As New TXTextControl.WPF.HyperlinkDialog(New TXTextControl.WPF.TextControl())
hyperlinkDialog.AllowsTransparency = True
```

---

## In This Section

- [HyperlinkDialog Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/hyperlinkdialog/constructor/llms-full.txt): Creates a HyperlinkDialog object for the specified WPF.TextControl.
- [HyperlinkDialog.DialogItem Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/hyperlinkdialog/dialogitem-enumeration/llms-full.txt): Each DialogItem represents an item in a WPF.HyperlinkDialog dialog box. The corresponding string of a DialogItem is the same as the item's Name property. The string can be used with the FrameworkElement.FindName method to get the item and manipulate, move or delete it.

---

## Nearby

- **Previous:** [GotoDialog.DialogItem Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/gotodialog/dialogitem-enumeration/llms-full.txt)
- **Next:** [HyperlinkDialog Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/hyperlinkdialog/constructor/llms-full.txt)
