# BookmarkDialog Constructor

> Creates a BookmarkDialog object for the specified WPF.TextControl.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Constructor
- **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
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > BookmarkDialog Constructor
- **802 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/bookmarkdialog/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/bookmarkdialog/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/bookmarkdialog/constructor/llms-full.txt

---

### Description

Creates a BookmarkDialog object for the specified [WPF.TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/llms-full.txt).

### Syntax

#### BookmarkDialog(TextControl)

Creates a BookmarkDialog object for the specified [WPF.TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/llms-full.txt). If there is a target at the current input position, the name of the target is shown and can be edited. Otherwise a new [DocumentTarget](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/llms-full.txt) can be inserted at the current input position.

```csharp
public BookmarkDialog(TextControl textControl);
```

```vbnet
Public Sub New(textControl As TextControl)
```

| Parameter | Description |
|---|---|
| textControl | Specifies the [WPF.TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/llms-full.txt) for which the dialog box is opened. |

#### BookmarkDialog(TextControl, DocumentTarget)

Creates a BookmarkDialog object for the specified [WPF.TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/llms-full.txt). If the specified [DocumentTarget](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/llms-full.txt) is not null, the name of the target is shown and can be edited. Otherwise a new `DocumentTarget` can be inserted at the current input position.

```csharp
public BookmarkDialog(TextControl textControl, DocumentTarget bookmarkToEdit);
```

```vbnet
Public Sub New(textControl As TextControl, bookmarkToEdit As DocumentTarget)
```

| Parameter | Description |
|---|---|
| textControl | Specifies the [WPF.TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/llms-full.txt) for which the dialog box is opened. |
| bookmarkToEdit | Specifies the `DocumentTarget` to edit. |

### Examples

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

```csharp
TXTextControl.WPF.BookmarkDialog bookmarkDialog = new(new TXTextControl.WPF.TextControl());
bookmarkDialog.AllowsTransparency = true;
```

```vbnet
Dim bookmarkDialog As New TXTextControl.WPF.BookmarkDialog(New TXTextControl.WPF.TextControl())
bookmarkDialog.AllowsTransparency = True
```

---

## Nearby

- **Previous:** [BookmarkDialog Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/bookmarkdialog/llms-full.txt)
- **Next:** [BookmarkDialog.DialogItem Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/bookmarkdialog/dialogitem-enumeration/llms-full.txt)
