# OpcDialogCondition Members

> Reference: Represents a snapshot of a 'Opc.UaFx.OpcDialogConditionNode'.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcDialogCondition</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Inherits members from [OpcCondition](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/members), [OpcEvent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members).

## Constructors

### OpcDialogCondition

<span class="api-meta">since v2.8</span>

Initializes a new instance of the [OpcDialogCondition](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdialogcondition/) class using the `dataStore` specified.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcDialogCondition(IOpcReadOnlyNodeDataStore dataStore)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub New(dataStore As IOpcReadOnlyNodeDataStore)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `dataStore` | [IOpcReadOnlyNodeDataStore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/) | The [IOpcReadOnlyNodeDataStore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/) of the 'Opc.UaFx.OpcDialogConditionNode' to represent. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `dataStore` is a null reference (Nothing in Visual Basic). |

## Properties

### CancelResponse

Gets a value which defines the index of the response in the [ResponseOptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdialogcondition/members#responseoptions) array that will cause the dialog to go into the inactive state without proceeding with the operation described by the prompt.

<div class="api-signature" data-lang="csharp">

```csharp
public int CancelResponse { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property CancelResponse As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The value allows a client to identify the Cancel option if a special handling for this option is available. If no Cancel option is available the value is -1. For more information 'Opc.UaFx.OpcDialogConditionNode.CancelResponse'.

### DefaultResponse

Gets a value which identifies the response option that should be shown as default to the user.

<div class="api-signature" data-lang="csharp">

```csharp
public int DefaultResponse { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property DefaultResponse As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The index to an item in the [ResponseOptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdialogcondition/members#responseoptions) array. If no response option is the default, the value is -1. For more information see 'Opc.UaFx.OpcDialogConditionNode.DefaultResponse'.

### IsActive

Gets a value indicating whether the dialog is active and is waiting for a response.

<div class="api-signature" data-lang="csharp">

```csharp
public bool IsActive { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property IsActive As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

A value indicating whether the dialog is active and is waiting for a response. For more information see 'Opc.UaFx.OpcDialogConditionNode.IsActive'.

### LastResponse

Gets a value which defines the last response provided by a client in the respond method.

<div class="api-signature" data-lang="csharp">

```csharp
public int LastResponse { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property LastResponse As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The index to an item in the [ResponseOptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdialogcondition/members#responseoptions) array. If no previous response exists then the value is -1. For more information see 'Opc.UaFx.OpcDialogConditionNode.LastResponse'.

### OkResponse

Gets a value which defines the index of the OK option in the [ResponseOptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdialogcondition/members#responseoptions) array.

<div class="api-signature" data-lang="csharp">

```csharp
public int OkResponse { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property OkResponse As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

This choice is the response that will allow the system to proceed with the operation described by the prompt. If no OK option is available the value is -1. For more information see 'Opc.UaFx.OpcDialogConditionNode.OkResponse'.

### Prompt

Gets the dialog prompt to be shown to the user.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcText Prompt { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property Prompt As OpcText
```

</div>

**Property value**

[OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/)

The message to be shown to the user. For more information see 'Opc.UaFx.OpcDialogConditionNode.Prompt'.

### ResponseOptions

Gets an array of supported response options.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcText[] ResponseOptions { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property ResponseOptions As OpcText()
```

</div>

**Property value**

[OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/)[]

An array of supported response options. The index in this array is used for the corresponding properties like [DefaultResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdialogcondition/members#defaultresponse), [LastResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdialogcondition/members#lastresponse) and the selected response in the respond method. For more information see 'Opc.UaFx.OpcDialogConditionNode.ResponseOptions'.
