# WindowDecorationProperties

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/chrome/struct-windowdecorationproperties/

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

```rust
struct WindowDecorationProperties
```

Provides attached properties for window decoration hit-testing.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/chrome/window_decoration_properties.rs#L5)

## Members

- [`TYPE`](#assoc_const-type)
- [`element_role_property`](#function-element_role_property)
- [`get_element_role`](#function-get_element_role)
- [`set_element_role`](#function-set_element_role)

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

### TYPE

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

The runtime type of this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/chrome/window_decoration_properties.rs#L7)

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

### element_role_property

```rust
fn element_role_property() -> &'static AttachedProperty<WindowDecorationsElementRole>
```

Defines the `ElementRole` attached property. Marks a visual
element with a specific role for non-client hit-testing. Can be
applied to any element in the visual tree, not limited to
decoration children.

Setting an element role only has an effect if the
`ExtendClientAreaToDecorationsHint` of the window is true.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/chrome/window_decoration_properties.rs#L9)

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

### get_element_role

```rust
fn get_element_role(element: &Visual) -> WindowDecorationsElementRole
```

Gets the `WindowDecorationsElementRole` for the specified element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/chrome/window_decoration_properties.rs#L29)

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

### set_element_role

```rust
fn set_element_role(element: &Visual, value: WindowDecorationsElementRole)
```

Sets the `WindowDecorationsElementRole` for the specified element.

Setting an element role only has an effect if the
`ExtendClientAreaToDecorationsHint` of the window is true.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/chrome/window_decoration_properties.rs#L37)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)

## Availability

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