I'm creating an app using Xamarin Studio on a Mac. The problem I'm facing is that a scrollview only works in the place where it was originally placed at.
I mean, I've a layout that slides to the right and left based on user input (I've two menus, one on the right and the other on the left, you get it). However, if the user doesn't open any menu the scrollview scrolls correctly, if the user does slide, it doesn't work anymore!
Here's how I'm handling the layout sliding with Xamarin.Forms:
public void toggle(){
Rectangle oldBounds = (Parent as RelativeLayout).Bounds;
oldBounds.X = -oldBounds.Width/ 3 * (_toggled?0:1);
(Parent as RelativeLayout).LayoutTo (oldBounds, 600, (_toggled?Easing.CubicOut:Easing.SpringOut));
_toggled = !_toggled;
}
Any function I might need to call? For example, forceLayout or something similar? I've tried this one and it doesn't work either!
Thanks in advance!
i managed to solve this! Check the github repository I created with an example. I included a comment on top of DetailView.cs explaining how I did it (hacky way of course! ;) ).
Basically I lay them side by side in a layout that fills all main page and than I use LayoutTo to change that layout Width so that the side menus are hidden.
Than, when you show them aka slide them in, they'll work as expected!
So, thats it, Xamarin.Forms dual panel sliding without any custom rendering!
Thanks for your help!