Xamarin.Forms
Xamarin.Forms copied to clipboard
[Spec] Shell flyout OnFlyoutMoving
[The feature]
Add a possibility to detect when the Shell flyout is sliding/moving from it open/close position.
Currently IsPresented
property allows only to know about the flyout position at 0% (false-closed) and 100% (true-opened).
API
Events
API | Description |
---|---|
OnFlyoutMoving | Triggered whenever the flyout is moving (swiping? sliding?) from it close or open position, either by swipe gesture or by clicking on the flyout icon |
FlyoutSwipingEventArgs
API | Description |
---|---|
OpenedPercentage | Returns the amount of opening of the flyout in percentage [0-1] [0-100] |
Direction | Based on last OpenedPercentage , is it going in the opening direction or in the closing direction.IsClosing IsOpening |
TriggerMode | Swipe(manual) Triggered by a swipe gesture IconClick Triggered by clicking on the flyout icon or click on the backdrop while opened. Unknown? Triggered from programmatically? |
Scenarios
Do an animation, trigger some logic, act on ui element or reorganize the elements on the page...
C# Example
void OnFlyoutSwiping(FlyoutSwipingEventArgs args)
{
if (args.OpenedPercentage > 0.6 && args.Direction.IsClosing)
//act on a ui element, scale, translate, fade or trigger something
}