Creates or overrides a resource with the given key.

Note that static resources are better declared with ux:Key. The ResourceSetter types are to be used when a dynamic value is needed, or one that cannot be expressed with ux:Key.

<Panel>
    <string Value="Static Page Title" ux:Key="Title"/>
</Panel>
<Each Items="{items}">
    <Panel>
        <ResourceString Key="Title" Value="{pageTitle}"/>
    </Panel>
</Each>

The resources created via ResourceSetter are local to where they are defined (this is also true of ux:Key). Bindings in this node, and its descendents, can bind to the them. Descendents may also provide a new resource with the same Key, which overrides it for that part of the UI tree.

Location

Namespace
Fuse.Resources
Package
Fuse.Nodes 2.9.1
Show Uno properties and methods

Interface of ResourceSetter<T>

Inherited from Node

ContextParent : Node uno

The context parent is the semantic parent of this node. It is where non-UI structure should be resolved, like looking for the DataContext, a Navigation, or other semantic item.

FindNodeByName(Selector, Predicate<Node> (Node)) : Node uno

Finds the first node with a given name that satisfies the given acceptor. The serach algorithm works as follows: Nodes in the subtree are matched first, then it matches the nodes in the subtrees ofthe ancestor nodes by turn all the way to the root. If no matching node is found, the function returns null.

IsRootingStarted : bool uno

Whether rooting of this node has started. Note that even if this property returns true, rooting may not yet be completed for the node. See also IsRootingCompleted.

Name : Selector ux

Run-time name of the node. This property is automatically set using the ux:Name attribute.

OnRooted uno

If you override OnRooted you must call base.OnRooted() first in your derived class. No other processing should happen first, otherwise you might end up in an undefined state.

Inherited from PropertyObject

Inherited from object

Implemented Interfaces

IScriptObject uno

Interface for objects that can have a script engine representation

See Also

DataToResource ux

Binds to a resource with the key provided in a context variable. This allows selecting resources from JavaScript by key name.