Xamarin Forms content page: change flow direction from right to left?
4 answers
@Hodor thanks there is no support for such a thing (at least at this time). A workaround to use when browsing lists is to create multiple list item templates with LTR / RTL directions and use them according to the current UI culture.
Another workaround for other controls is to implement a renderer for each control type and change its HorizontalOptions or XAlignment to suit the culture of the user interface.
+2
source to share
Do you mean navigation flow?
Usually left => right means adding the page to the navigation stack, while right => left means removing.
You can extend the navigation controller in a native C # codec and create custom animations. There are many ways to do this. Here is an example in MonoTouch
public partial class ScreenController : UINavigationController
{
private Page currentPage = null;
private void setCurrentPage(Page p)
{
currentPage = p;
//Using present View Controller: will set the current page to root.
PresentViewController(new UINavigationController(currentPage.CreateViewController())
{
ModalTransitionStyle = UIModalTransitionStyle.FlipHorizontal,
}, true, null);
//Using custom animation
PushControllerWithTransition(this, currentPage.CreateViewController(), UIViewAnimationOptions.TransitionFlipFromLeft);
}
public static void PushControllerWithTransition(this UINavigationController target, UIViewController controllerToPush,
UIViewAnimationOptions transition)
{
UIView.Transition(target.View, 0.75d, transition, delegate()
{
target.PushViewController(controllerToPush, false);
}, null);
}
}
-1
source to share