# IGlobalStyles

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/styling/trait-iglobalstyles/

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

```rust
trait IGlobalStyles: IStyleHost
```

Defines the style host that provides styles global to the application.

The application object implements this; the root elements of logical trees
return it as their styling parent, which makes the global styles and
resources part of every style and resource lookup.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/i_global_styles.rs#L13)

## Members

- [`global_styles_added`](#function-global_styles_added)
- [`global_styles_removed`](#function-global_styles_removed)

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

### global_styles_added

```rust
fn global_styles_added(self: &Self, handler: Rc<GlobalStylesHandler>) -> Rc<dyn IDisposable>
```

Raised when styles are added to the global styles or a nested styles
collection. Disposing the returned handle unsubscribes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/i_global_styles.rs#L16)

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

### global_styles_removed

```rust
fn global_styles_removed(self: &Self, handler: Rc<GlobalStylesHandler>) -> Rc<dyn IDisposable>
```

Raised when styles are removed from the global styles or a nested
styles collection. Disposing the returned handle unsubscribes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/i_global_styles.rs#L20)

## Availability

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