# FromXamlObject

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

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

```rust
trait FromXamlObject: Sized
```

A type an untyped object can be tested for and viewed as: the `T` of the
managed `obj as T`.

Implemented for the handles of classes (`Ref<T>`, which also accepts
handles of derived classes), for shared plain types (`Rc<T>`) and for
the contracts the markup runtime looks for.

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

## Members

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

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

### from_xaml_object

```rust
fn from_xaml_object(value: &BoxedValue) -> Option<Self>
```

The object as a `Self`, if it is one.

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

## Trait implementations

- [`FromXamlObject`](/docs/0.5.0/api/ferroui-markup-xaml/trait-fromxamlobject/)

## Availability

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