WhileSelected Constructor uno
Creates a new WhileSelected
This trigger is active while the Selectable is currently selected in the Selection
This attaches to the first Selectable node that is an ancestor of this one.
Consider also the isSelected()
function for use in expressions.
Creates a new WhileSelected
Call in situations where the bypassing is forced. This should be rare since during rooting the normal bypass mechanism of the trigger will apply.
Inverts the trigger so it will be active when it would normally be inactive, and vice versa.
A list of actions that execute with the trigger. These may react on simple direction changes, or at specific time offsets.
If there is a transition between forward/backward playback and two timeilnes are being used (implicit or explicit) this specifies the cross-fade time.
true
if there is an explicit backward animation.
Play the trigger from where it currently is to the end.
Indicates the trigger is bound to the layout of a visual. This will keep the trigger in Bypass mode until after the first layout of the element is obtained. This is required since layout does not happen in the same root grouping/update phase as the creation of the element, yet not having a layout should qualify as part of the rooting period.
Stretches the duration of the animation to fill up this period of time.
Specifies a multiplier to the elapsed time for animation playback.
Nodes to add to the Parent when this trigger is any non-deactivated state (Progress > 0)
The list of bindings belonging to this node.
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.
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.
Whether rooting for this node is completed. Returns false if unrooting has started.
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.
Run-time name of the node. This property is automatically set using the ux:Name attribute.
Returns the next sibling node of the given type.
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.
The parent Visual of this node. Will return null if the node is not rooted.
Returns the next sibling node of the given type.
A linked list holding data for extrinsic properties.
hide
hide
Interface for objects that can have a script engine representation
hide
The following example uses Selection to create a simple list of options. Tap the items to toggle their selection. Values
is bound to a JavaScript Observable
in order to track the currently selected items.
<Panel ux:Class="MyItem" Color="#aaa">
<string ux:Property="Label" />
<string ux:Property="Value" />
<Selectable Value="{ReadProperty this.Value}" />
<Text Value="{ReadProperty this.Label}" />
<WhileSelected>
<Change this.Color="#ffc" />
</WhileSelected>
<Tapped>
<ToggleSelection />
</Tapped>
</Panel>
<JavaScript>
var Observable = require("FuseJS/Observable");
var values = Observable();
var list = Observable(function() {
return values.toArray().join(",");
});
module.exports = {
values: values,
list: list
};
</JavaScript>
<StackPanel>
<Selection Values="{values}" />
<MyItem Label="Big Red One" Value="sku-01" />
<MyItem Label="Small Green Two" Value="sku-02" />
<MyItem Label="Third Last One" Value="sku-03" />
<MyItem Label="Four Fore For" Value="sku-04" />
<MyItem Label="Point Oh-Five" Value="sku-05" />
<Text Value="Selected:" Margin="0,10,0,0" />
<Text Value="{list}" />
</StackPanel>