# WindowDrawnDecorationsTemplate

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-markup-xaml/templates/struct-windowdrawndecorationstemplate/

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

```rust
struct WindowDrawnDecorationsTemplate
```

The template of the decorations a window draws itself, as markup
declares it.

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

## Members

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

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

### new

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



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

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

### content

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

The template content: deferred content whose result is the
decorations content.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup.Xaml/templates/window_drawn_decorations_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/Markup/FerroUI.Markup.Xaml/templates/window_drawn_decorations_template.rs#L29)

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

### build

```rust
fn build(self: &Self) -> TemplateResult<Ref<WindowDrawnDecorationsContent>>
```

Builds the decorations content.
## Panics
Panics if the template has no content.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup.Xaml/templates/window_drawn_decorations_template.rs#L37)

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

### try_build

```rust
fn try_build(self: &Self) -> Result<TemplateResult<Ref<WindowDrawnDecorationsContent>>, crate::XamlLoadError>
```

`build` without the panic: a template without content
is an error.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup.Xaml/templates/window_drawn_decorations_template.rs#L43)

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

### as_window_drawn_decorations_template

```rust
fn as_window_drawn_decorations_template(self: &Self) -> Rc<dyn IWindowDrawnDecorationsTemplate>
```

The template as the decorations template contract.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup.Xaml/templates/window_drawn_decorations_template.rs#L50)

## 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`
- [`IWindowDrawnDecorationsTemplate`](/docs/0.5.0/api/ferroui-controls/chrome/trait-iwindowdrawndecorationstemplate/)
- [`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/).
