NavigatorSwipe Class
Allows navigation through swipe gestures.
We can control the behavior of a NavigatorSwipe
using the How
parameter, which controls what happens when the specified direction is swiped. PushBookmark
and GotoBookmark
both
navigate to the bookmark specified by the Bookmark
property in their own way(same behavior as Router ). Back
navigates backwards, but should be used with caution,
as it does not check if there is anything to go back to, meaning it can generate errors.
In the following example, we demonstrate NavigatorSwipe
being used on both a Navigator
, and navigated pages. Some navigation rules are set up:
- Swiping up while on the blue panel will go to a bookmark pointing to the indigo page.
- Swiping up while on the indigo page will navigate you to the red page.
- Swiping down on any page will go back to the previous page.
<Panel>
<Router ux:Name="router" />
<JavaScript>
router.bookmark({
name: "indigo",
path: [ "indigoPanel", { } ]
});
router.bookmark({
name: "red",
path: [ "redPanel", { } ]
});
</JavaScript>
<DockPanel ux:Class="NamedPanel">
<string ux:Property="Title" />
<Text Value="{Property Title}" FontSize="30" Alignment="TopCenter" Margin="20" />
</DockPanel>
<Navigator DefaultPath="bluePanel">
<NamedPanel Title="Blue panel" ux:Template="bluePanel" Color="#2196F3">
<NavigatorSwipe How="PushBookmark" Bookmark="indigo" Direction="Up"/>
</NamedPanel>
<NamedPanel Title="Red panel" ux:Template="redPanel" Color="#F44336" />
<NamedPanel Title="Indigo panel" ux:Template="indigoPanel" Color="#3F51B5">
<NavigatorSwipe How="PushBookmark" Bookmark="red" Direction="Up"/>
</NamedPanel>
<NavigatorSwipe How="Back" Direction="Down"/>
</Navigator>
</Panel>
Location
- Namespace
- Fuse.Controls
- Package
- Fuse.Controls.Navigation 2.9.1
Interface of NavigatorSwipe
Direction : NavigatorSwipeDirection ux
How : NavigatorSwipeHow ux
IsEnabled : bool ux
NavigatorSwipe Constructor uno
Style : string ux
Inherited from NodeGroupBase
FindTemplate(string) : Template uno
Nodes : IList of Node ux
Nodes to add to the Parent when this trigger is any non-deactivated state (Progress > 0)
OnNodeAdded(Node) uno
OnNodeRemoved(Node) uno
Resources : IList of Resource ux
Templates : IList of Template ux
Inherited from Node
Add(Binding) uno
Bindings : IList of Binding ux
The list of bindings belonging to this 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.
FindByType<T> : T uno
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.
GetNearestAncestorOfType<T> : T uno
Insert(int, Binding) uno
IsRootingCompleted : bool uno
Whether rooting for this node is completed. Returns false if unrooting has started.
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.
NextSibling<T> : T uno
Returns the next sibling node of the given type.
OnDataChanged(string, object) uno
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.
OnUnrooted uno
Parent : Visual uno
The parent Visual of this node. Will return null if the node is not rooted.
PreviousSibling<T> : T uno
Returns the next sibling node of the given type.
Properties : Properties uno
A linked list holding data for extrinsic properties.
Remove(Binding) : bool uno
SoftDispose uno
SourceFileName : string ux
hide
SourceLineNumber : int ux
hide
SubtreeToString : string uno
SubtreeToString(StringBuilder, int) uno
TryGetResource(string, Predicate<object> (object), object) : bool uno
VisitSubtree(Action<Node> (Node)) uno
Inherited from PropertyObject
AddPropertyListener(IPropertyListener) uno
OnPropertyChanged(Selector, IPropertyListener) uno
OnPropertyChanged(Selector) uno
RemovePropertyListener(IPropertyListener) uno
Inherited from object
Equals(object) : bool uno
GetHashCode : int uno
GetType : Type uno
ToString : string uno
Attached UX Attributes
GlobalKey (attached by Resource) : string ux
Implemented Interfaces
IList<Binding> uno
IScriptObject uno
Interface for objects that can have a script engine representation
IProperties uno
ISourceLocation uno
hide