# NotificationTemplate

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactivity/struct-notificationtemplate/

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

```rust
struct NotificationTemplate
```

A template for creating notifications: each `build` creates a new
notification from the content.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/templates/notification_template.rs#L13)

## Members

- [`new`](#function-new)
- [`content`](#function-content)
- [`set_content`](#function-set_content)
- [`build`](#function-build)

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

### new

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

Creates an empty template.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/templates/notification_template.rs#L19)

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

### content

```rust
fn content(self: &Self) -> Option<BoxedValue>
```

Gets or sets the content of the template: deferred content built on each
`build`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/templates/notification_template.rs#L25)

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

### set_content

```rust
fn set_content(self: &Self, value: Option<BoxedValue>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/templates/notification_template.rs#L29)

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

### build

```rust
fn build(self: &Self) -> Option<Rc<dyn INotification>>
```

Builds the notification from the template.
## Panics
Panics if the content is not template content, or builds something else than a
notification.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/templates/notification_template.rs#L38)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Default`
- [`ITemplate`](/docs/0.5.0/api/ferroui-base/styling/trait-itemplate/)
- `PartialEq`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)

## Availability

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