# DevicePopups

Namespace: **Wisej.Hybrid**

Assembly: **Wisej.Hybrid** (3.5.0.0)

Provides methods to show popups.

{% tabs %}
{% tab title="C#" %}

```csharp
public class DevicePopups
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class DevicePopups
```

{% endtab %}
{% endtabs %}

Access this class through the [Device](/hybrid/start/api/general/wisej.hybrid.device.md) singleton.

## Constructors

### ![](/files/CCV9PPenlC1YZvNh1I6R)DevicePopups()

Initializes a new instance of [DevicePopups](/hybrid/start/api/ui/wisej.hybrid.devicepopups.md).

## Methods

### ![](/files/CCV9PPenlC1YZvNh1I6R)DisplayActionSheet(title, cancel, destruction, direction, buttons)

Displays a native platform action sheet, allowing the application user to choose from several buttons.

| Parameter       | Type                                                                            | Description                                                                               |
| --------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| **title**       | [String](https://docs.microsoft.com/dotnet/api/system.string)                   | Title of the displayed action sheet. Must not be null.                                    |
| **cancel**      | [String](https://docs.microsoft.com/dotnet/api/system.string)                   | Text to be displayed in the 'Cancel' button. Can be null to hide the cancel action.       |
| **destruction** | [String](https://docs.microsoft.com/dotnet/api/system.string)                   | Text to be displayed in the 'Destruct' button. Can be null to hide the destructiveoption. |
| **direction**   | [FlowDirection](https://docs.wisej.com/api?q=wisej.hybrid.shared.flowdirection) | The flow direction of the items.                                                          |
| **buttons**     | [String\[\]](https://docs.microsoft.com/dotnet/api/system.string)               | Text labels for additional buttons. Must not be null.                                     |

**Returns:** [String](https://docs.microsoft.com/dotnet/api/system.string). The selected button.

### ![](/files/CCV9PPenlC1YZvNh1I6R)DisplayAlert(title, message, cancel)

Presents an alert dialog to the application user with a single cancel button.

| Parameter                                   | Type                                                          | Description                                  |
| ------------------------------------------- | ------------------------------------------------------------- | -------------------------------------------- |
| **title**                                   | [String](https://docs.microsoft.com/dotnet/api/system.string) | The title of the alert dialog.               |
| **message**                                 | [String](https://docs.microsoft.com/dotnet/api/system.string) | The body text of the alert dialog.           |
| **cancel** ![](/files/hKoZkt511VItWvI9RDIT) | [String](https://docs.microsoft.com/dotnet/api/system.string) | Text to be displayed on the 'Cancel' button. |

### ![](/files/CCV9PPenlC1YZvNh1I6R)DisplayPrompt(title, message, accept, cancel, placeholder, maxLength, keyboard, initialValue)

Shows a modal prompt.

| Parameter                                         | Type                                                                  | Description                    |
| ------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------ |
| **title**                                         | [String](https://docs.microsoft.com/dotnet/api/system.string)         | The title of the prompt        |
| **message**                                       | [String](https://docs.microsoft.com/dotnet/api/system.string)         | The message of the prompt      |
| **accept** ![](/files/hKoZkt511VItWvI9RDIT)       | [String](https://docs.microsoft.com/dotnet/api/system.string)         | The accept button text         |
| **cancel** ![](/files/hKoZkt511VItWvI9RDIT)       | [String](https://docs.microsoft.com/dotnet/api/system.string)         | The cancel button text         |
| **placeholder** ![](/files/hKoZkt511VItWvI9RDIT)  | [String](https://docs.microsoft.com/dotnet/api/system.string)         | The text placeholder           |
| **maxLength** ![](/files/hKoZkt511VItWvI9RDIT)    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)           | The maximum length of the text |
| **keyboard** ![](/files/hKoZkt511VItWvI9RDIT)     | [Keyboard](https://docs.wisej.com/api?q=wisej.hybrid.shared.keyboard) | The keyboard to use            |
| **initialValue** ![](/files/hKoZkt511VItWvI9RDIT) | [String](https://docs.microsoft.com/dotnet/api/system.string)         | The initial text value         |

**Returns:** [String](https://docs.microsoft.com/dotnet/api/system.string). The result of the prompt.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/hybrid/start/api/ui/wisej.hybrid.devicepopups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
