# Popup

The **RadNotifyIcon** allows for displaying a popup upon interacting with the icon or by manually calling the exposed methods.

## PopupContent

The **PopupContent** property allow for setting the popup's content and changing its default look. The **PopupContent** property is of type **Control**. This way you can design your Form, UserControl, etc. and set it as a content of the popup.

```C#
void ShowNotifyIconPopup()
{
    RadNotifyIcon radNotifyIcon = new RadNotifyIcon();
    radNotifyIcon.TrayIcon = new System.Drawing.Icon("../../WinForms128x28.ico");
    radNotifyIcon.PopupContent = new UserControl1();
    radNotifyIcon.ShowTrayIcon = true;
}
```

```VB.NET
Private Sub ShowNotifyIconPopup()
    Dim radNotifyIcon As RadNotifyIcon = New RadNotifyIcon()
    radNotifyIcon.TrayIcon = New System.Drawing.Icon("../../WinForms128x28.ico")
    radNotifyIcon.PopupContent = New UserControl1()
    radNotifyIcon.ShowTrayIcon = True
End Sub
```

#### **Figure 1: RadNotifyIcon with Popup** (Windows 11 OS)

![RadNotifyIcon with activated popup](https://www.telerik.com/products/winforms/documentation/assets/402dc94d525065631e4536031d8f866e/radnotifyicon-features-popup_001.png)

## PopupActivationMouseEvent

The **PopupActivationMouseEvent** property determines when the popup will be shown. The default value is **LeftClick**. This property is enumeration and it expose the following values:

* **LeftClick**: Triggered on left mouse click.
* **RightClick**: Triggered on right mouse click.
* **MiddleClick**: Triggered on middle mouse click.
* **LeftDoubleClick**: Triggered on left mouse double click.
* **RightDoubleClick**: Triggered on right mouse double click.
* **MiddleDoubleClick**: Triggered on middle mouse double click.
* **All**: Triggered on any mouse click action.

```C#
radNotifyIcon.PopupActivationMouseEvent = MouseActivationEvent.All;
```

```VB.NET
radNotifyIcon.PopupActivationMouseEvent = MouseActivationEvent.All
```

## PopupShowDuration

The **PopupShowDuration** specifies the amount of time in **milliseconds** after which the popup will begin to close automatically. The default value is **5000** milliseconds (5s).

```C#
radNotifyIcon.PopupShowDuration = 3000;
```

```VB.NET
radNotifyIcon.PopupShowDuration = 3000
```

## PopupCloseMode

The **PopupCloseMode** is a bitwise enumeration, which controls the actions that will close the popup. The possible values are:

* **None**: The popup can only be closed in code (with the **HidePopup** method) or by clicking on the notify icon.
* **Deactivate**: The popup can be closed by clicking outside of it or by deactivating it with a windows keyboard shortcut.
* **Timeout**: The popup will be closed after the time specified by the **PopupShowDuration** runs out. This is the default value.

## Programmatically Showing the Popup

The RadNotifyIcon allows for programmatically showing a popup through the **ShowPopup** method. It exposes one overload, which provides the option of specifying a screen location.

* **void ShowPopup()**: Shows the popup on top of the notify icon.
* **void ShowPopup(Point location)**: Shows the popup at the provided location.

```C#
radNotifyIcon.ShowPopup();
```

```VB.NET
radNotifyIcon.ShowPopup()
```

## Programmatically Hiding the Popup

You can manually hide the popup with the **HidePopup** method as shown in **Example 6**.

```C#
radNotifyIcon.HidePopup();
```

```VB.NET
radNotifyIcon.HidePopup()
```

## Popup Animations

You can control the opening and closing animation with the **PopupShowAnimation** and **PopupHideAnimation** properties respectively. These properties are enumeration (**NotifyIconAnimationType**) and it expose the following values:

* **None**: No animation.
* **Fade**: A Fade animation is applied.
* **Timeout**: A 'Slide' animation is applied.

```C#
radNotifyIcon.PopupShowAnimation = NotifyIconAnimationType.Slide;
radNotifyIcon.PopupHideAnimation = NotifyIconAnimationType.Fade;
```

```VB.NET
radNotifyIcon.PopupShowAnimation = NotifyIconAnimationType.Slide
radNotifyIcon.PopupHideAnimation = NotifyIconAnimationType.Fade
```

#### **Figure 2: Show/Hide Animation** (Windows 10 OS)

![RadNotifyIcon show/hide animation](https://www.telerik.com/products/winforms/documentation/assets/b338b0d8ee8805df27654957bb8e6a2c/radnotifyicon-features-popup_002.gif)

## IsPopupOpen

The **IsPopupOpen** property allows you to check whether a popup is currently open.

## See Also

* [Tooltip](https://www.telerik.com/products/winforms/documentation/controls/notifyicon/features/tooltip)
