Back to Devexpress

ToastNotificationsManager.ApplicationActivator Property

windowsforms-devexpress-dot-xtrabars-dot-toastnotifications-dot-toastnotificationsmanager-0c7f8b6a.md

latest3.4 KB
Original Source

ToastNotificationsManager.ApplicationActivator Property

Gets or sets the toast Activator - a descendant of the DevExpress.XtraBars.ToastNotifications.ToastNotificationActivator class that allows you to manage end-user interactions with toast elements (buttons, selection menus and input boxes). You should not set this property in code (see the “Remarks” section below for more information).

Namespace : DevExpress.XtraBars.ToastNotifications

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(null)]
[DXCategory("Behavior")]
public Type ApplicationActivator { get; set; }
vb
<DXCategory("Behavior")>
<DefaultValue(Nothing)>
Public Property ApplicationActivator As Type

Property Value

TypeDefaultDescription
Typenull

A Type of a custom class that serves as an Activator.

|

Remarks

Application Activator is a class marked with the ComVisible and Guid attributes that derive from the base DevExpress.XtraBars.ToastNotifications.ToastNotificationActivator class. The Activator overrides the OnActivate base class method to respond to end-users clicking toast buttons and using interactive toast elements, such as input boxes and selection menus (see the “User Input” section for an example).

You should only assign the ApplicationActivator property at design time.

If you need to set an Activator in code, use the RegisterApplicationActivator/UnregisterApplicationActivator methods instead (note that these methods are hidden from IntelliSense).

csharp
public XtraForm1() {
    InitializeComponent();
    toastNotificationsManager1.RegisterApplicationActivator(typeof(ToastNotificationActivatorCustom));
    this.FormClosed += XtraForm1_FormClosed;
}

private void XtraForm1_FormClosed(object sender, FormClosedEventArgs e) {
    toastNotificationsManager1.UnregisterApplicationActivator();
}
vb
Public Sub New()
    InitializeComponent()
    toastNotificationsManager1.RegisterApplicationActivator(GetType(ToastNotificationActivatorCustom))
    AddHandler Me.FormClosed, AddressOf XtraForm1_FormClosed
End Sub 

Private Sub XtraForm1_FormClosed(ByVal sender As Object, ByVal e As FormClosedEventArgs)
    toastNotificationsManager1.UnregisterApplicationActivator()
End Sub

See Also

ToastNotificationsManager Class

ToastNotificationsManager Members

DevExpress.XtraBars.ToastNotifications Namespace