Allows placing a node in a different place in the UX tree than the location of this behavior, while keeping the data context from this behavior.

Example

<Panel ux:Class="MyPage">
    <Visual ux:Dependency="navBar" />
    <string ux:Property="Content" />
    <float4 ux:Property="Highlight" />
    <Text Alignment="Center" Value="{ReadProperty Content}" />
    <WhileActive>
        <AlternateRoot ParentNode="navBar">
            <Rectangle Color="{ReadProperty Highlight}" />
        </AlternateRoot>
    </WhileActive>
</Panel>

<ClientPanel>
    <Panel ux:Name="navBar" Dock="Top" Height="56" />
    <PageControl>
        <MyPage Content="Page 1" Highlight="#18f" navBar="navBar" />
        <MyPage Content="Page 2" Highlight="#1f8" navBar="navBar" />
    </PageControl>
</ClientPanel>

Location

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

Interface of AlternateRoot

Visual : Node ux

Deprecated, for backwards compatibility. Use Node instead.

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.

Inherited from PropertyObject

Inherited from object

Attached UX Attributes

GlobalKey (attached by Resource) : string ux

The ux:Global attribute creates a global resource that is accessible everywhere in UX markup.

Implemented Interfaces

IScriptObject uno

Interface for objects that can have a script engine representation