# XamlResourceNode

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-markup-xaml/enum-xamlresourcenode/

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

```rust
enum XamlResourceNode
```

A resource node found among untyped objects.

Elements are kept as they are, so that walking a parent stack does not
allocate an adapter for each of them.

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

## Members

- [`Element`](#variant-element)
- [`Node`](#variant-node)
- [`has_resources`](#function-has_resources)
- [`try_get_resource`](#function-try_get_resource)

<a id="variant-element"></a>

### Element

```rust
Element(ferroui_base::Ref<ferroui_base::StyledElement>)
```



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

<a id="variant-node"></a>

### Node

```rust
Node(std::rc::Rc<dyn IResourceNode>)
```



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

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

### has_resources

```rust
fn has_resources(self: &Self) -> bool
```

`IResourceNode.HasResources`.

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

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

### try_get_resource

```rust
fn try_get_resource(self: &Self, key: &ResourceKey, theme: Option<&ThemeVariant>) -> Option<ResourceValue>
```

`IResourceNode.TryGetResource`.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- [`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/).
