# MarkupExtension

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-markup-xaml/trait-markupextension/

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

```rust
trait MarkupExtension
```

The base of markup extensions: objects that provide the value of a
property in markup (`{StaticResource Key}`).

A type is a markup extension if its metadata declares a `ProvideValue`
method; implementing this trait is the equivalent of deriving from the
abstract base class.

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

## Members

- [`provide_value`](#function-provide_value)

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

### provide_value

```rust
fn provide_value(self: &Self, service_provider: &Rc<dyn IServiceProvider>) -> Result<Option<BoxedValue>, XamlLoadError>
```

Returns the object to set on the target property. Null is `None`.

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

## Availability

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