Vibrate Class
Vibrate the device for a duration or by vibration type (only on iOS)
You'll find this trigger action in the Fuse.Vibration package, which have to be referenced from your uno project. For example:
{
"Packages": [
"Fuse",
"FuseJS",
"Fuse.Vibration"
]
}
Example
<StackPanel Margin="20">
<Button Margin="10" Text="Vibrate">
<Clicked>
<Vibrate Duration="5" />
</Clicked>
</Button>
</StackPanel>
On iOS you can do vibration by leveraging Taptic Engine. There are 9 types of vibration :
- Soft
- Rigid
- Light
- Medium
- Heavy
- Success
- Warning
- Error
- Selection
To activate it, just pass those value to
VibrationType
property
##Example
<StackPanel Margin="20">
<!-- Works on iOS using Taptic Engine -->
<Button Margin="10" Text="Heavy Vibrate">
<Clicked>
<Vibrate VibrationType="Heavy" />
</Clicked>
</Button>
</StackPanel>
Location
- Namespace
- Fuse.Vibration
- Package
- Fuse.Vibration 2.9.1
Interface of Vibrate
Vibrate Constructor uno
Creates a new Vibrate
VibrationType : VibrationType ux
Inherited from TriggerAction
AtProgress : float ux
Delay : float ux
The number of seconds after the start of the trigger that the action should be performed.
Direction : TriggerWhen ux
IsActive : bool ux
IsProgressTriggered : bool uno
OnUnrooted uno
Perform(Node) uno
PerformFromNode(Node) uno
ProgressWhen(float) : float uno
SourceFileName : string ux
hide
SourceLineNumber : int ux
hide
TargetNode : Node ux
Unroot uno
When : TriggerWhen ux
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
ISourceLocation uno
hide