# NotificationCard

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/notifications/struct-notificationcard/

**struct** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
struct NotificationCard
```

Control that represents and displays a notification.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L30)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`is_closing_property`](#function-is_closing_property)
- [`is_closed_property`](#function-is_closed_property)
- [`notification_type_property`](#function-notification_type_property)
- [`close_on_click_property`](#function-close_on_click_property)
- [`notification_closed_event`](#function-notification_closed_event)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`is_closing`](#function-is_closing)
- [`is_closed`](#function-is_closed)
- [`set_is_closed`](#function-set_is_closed)
- [`notification_type`](#function-notification_type)
- [`set_notification_type`](#function-set_notification_type)
- [`notification_closed`](#function-notification_closed)
- [`get_close_on_click`](#function-get_close_on_click)
- [`set_close_on_click`](#function-set_close_on_click)
- [`close`](#function-close)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L35)

<a id="function-to_ref"></a>

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<NotificationCard>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L35)

<a id="function-is_closing_property"></a>

### is_closing_property

```rust
fn is_closing_property() -> &'static DirectProperty<NotificationCard, bool>
```

Defines the `IsClosing` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L85)

<a id="function-is_closed_property"></a>

### is_closed_property

```rust
fn is_closed_property() -> &'static StyledProperty<bool>
```

Defines the `IsClosed` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L85)

<a id="function-notification_type_property"></a>

### notification_type_property

```rust
fn notification_type_property() -> &'static StyledProperty<NotificationType>
```

Defines the `NotificationType` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L85)

<a id="function-close_on_click_property"></a>

### close_on_click_property

```rust
fn close_on_click_property() -> &'static AttachedProperty<bool>
```

Defines the `CloseOnClick` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L85)

<a id="function-notification_closed_event"></a>

### notification_closed_event

```rust
fn notification_closed_event() -> &'static RoutedEvent<RoutedEventArgs>
```

Defines the `NotificationClosed` event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L110)

<a id="function-construct"></a>

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L125)

<a id="function-new"></a>

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L129)

<a id="function-is_closing"></a>

### is_closing

```rust
fn is_closing(self: &Self) -> bool
```

Determines if the notification is already closing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L134)

<a id="function-is_closed"></a>

### is_closed

```rust
fn is_closed(self: &Self) -> bool
```

Determines if the notification is closed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L143)

<a id="function-set_is_closed"></a>

### set_is_closed

```rust
fn set_is_closed(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L147)

<a id="function-notification_type"></a>

### notification_type

```rust
fn notification_type(self: &Self) -> NotificationType
```

The type of the notification.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L152)

<a id="function-set_notification_type"></a>

### set_notification_type

```rust
fn set_notification_type(self: &Self, value: NotificationType)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L156)

<a id="function-notification_closed"></a>

### notification_closed

```rust
fn notification_closed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
```

Raised when the notification card has closed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L161)

<a id="function-get_close_on_click"></a>

### get_close_on_click

```rust
fn get_close_on_click(obj: &Button) -> bool
```

Gets the value of the `CloseOnClick` attached property of a button.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L169)

<a id="function-set_close_on_click"></a>

### set_close_on_click

```rust
fn set_close_on_click(obj: &Button, value: bool)
```

Sets the value of the `CloseOnClick` attached property of a button:
whether clicking the button closes the notification card it is in.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L175)

<a id="function-close"></a>

### close

```rust
fn close(self: &Self)
```

Closes the notification card.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/notification_card.rs#L223)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ContentControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<NotificationCard>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`ContentControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
