in our project we are going to lock app in portrait mode, no problem so far. Now we would like to have the possibility to rotate only some specific pages or content (to display larger plots). I've googled the many threads on this issue but didn't find a clear solution. Is there any clean way for specify orientation on page basis for both Andoid and Ios?
We where also investigating the possibility to just rotate the plot view but we are having problems in sizing it; No matter what i specify for height and width request the graph is always displayed with containing page width and height. We tried both to invert the size before rotating:
rotatedView.WidthRequest = Height;
rotatedView.HeightRequest = Width;
rotatedView.Rotate(90)
contentView.Content = rotatedView;
And drawing it smaller by imposing the aspect ratio it would have after rotation and then scaling:
rotatedView.WidthRequest = Width;
double ratio = Height / Width;
rotatedView.HeightRequest = Width / ratio;
rotatedView.Rotation = 90;
rotatedView.ScaleTo(ratio)
contentView.Content = graphRot;
The view after rotation keeps the same aspect ratio of original page with Width being equal to page Height and viceversa.
Any hint would be much appreciated
UPDATE
Regarding View rotation i was able to do it by placing all stuff in a relative layout. This way i was able to freely define view size being equal to rotated container size.