# Notification class

Namespace: [Rhino.Runtime.Notifications](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.runtime.notifications.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public class Notification : INotifyPropertyChanged, IAssemblyRestrictedObject
```

A Notification instance can be used to inform the user about various events. For a Notification instance to be displayed in Rhino, it must be added to the [NotificationCenter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notificationcenter.md). When added, it will be displayed in the Notifications panel in Rhino. A Notification contains 1 to 3 buttons that are automatically wired to its [Notification.ButtonClicked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/buttonclicked.md) Action if it is not null. The buttons are displayed when the Notification is shown modally by either the user clicking on a particular notification in the Notifications panel, or by programatically showing it using [Notification.ShowModal()](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/showmodal.md). Currently, only process-wide notifications are supported; document specific notifications are not possible. Notification instances contain metadata that can be added, modified, or removed during its life. The metadata is important for LINQ queries and other patterns. For example, a particular action may require that multiple notifications be modified. Thus, a LINQ query can be performed on the [NotificationCenter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notificationcenter.md) using metadata to retrieve related Notification objects and modify them as a batch. Notification objects implement [IAssemblyRestrictedObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.iassemblyrestrictedobject.md). By default, a Notification can be editedby any assembly, but explicitly specifing allowed assemblies in the constructor changes this behavior. Notification objects are not thread-safe and should only be manipulated in UI thread.

## Constructors

- [Notification](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/ctor.md): (2 overloads) Creates a new instance that can be edited by any assembly.

## Properties

- [AllowedAssemblies](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/allowedassemblies.md): The assemblies that can modify this instance.
- [AlternateButtonTitle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/alternatebuttontitle.md): The localized title of the Alternate button.
- [ButtonClicked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/buttonclicked.md): An Action that will be invoked whenever a button for the notification is clicked or the notification is closed.
- [CancelButtonTitle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/cancelbuttontitle.md): The localized title of the Cancel button.
- [ConfirmButtonTitle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/confirmbuttontitle.md): The localized title of the Confirm button.
- [DateUpdated](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/dateupdated.md): The date the notification was last modified.
- [Description](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/description.md): The description of the notification. The description is displayed in the Notifications panel in Rhino.
- [Message](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/message.md): The message of the notification. The message is shown only when the instance is displayed modally. It should contain details about the notification.
- [MetadataCopy](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/metadatacopy.md): A copy of all the metadata for this class.
- [SeverityLevel](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/severitylevel.md): The severity of the notification. Changing the severity of the notification may change the way Rhino chooses to display the Notifications panel.
- [ShowEventId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/showeventid.md): A field used by Rhino for displaying notifications. Not intended for public use.
- [Title](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/title.md): The title of the notification. The title is displayed when the notification is displayed modally in Rhino.

## Indexers

- [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/item.md): Gets or sets metadata for this instance.

## Methods

- [Editable](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/editable.md): Determines whether an assembly can modify the instance. Any code that modifies an assembly protected notification must be wrapped in a [Notification.ExecuteAssemblyProtectedCode(Action)](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/executeassemblyprotectedcode.md) method.
- [ExecuteAssemblyProtectedCode<TResult>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/executeassemblyprotectedcode.md): (2 overloads, static) If a [Notification](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification.md) object is only allowed to be modified by certain assemblies, then any code that interacts with it must be wrapped around this method, or a [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) will be thrown. For performance reasons, the code wrapped by this method should be kept as simple as possible.
- [HideModal](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/hidemodal.md): Tells Rhino to hide the notification if it is being currently shown as a modal.
- [RemoveMetadata](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/removemetadata.md): Removes metadata from this instance.
- [ShowModal](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/showmodal.md): Tells Rhino to display the notification modally.
- [ToString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/tostring.md): Returns a readable string representation of the instance.

## Events

- [PropertyChanged](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.notifications.notification/propertychanged.md): Triggered whenever a visible property of the instance changes.
