private void ExpandOrCollapse(View master, Action <View, Rectangle, double> move) { int counter = 0; var startAngel = StartAngel; var interval = Interval; foreach (var child in Children.Skip(1)) { if (IsExpanded) { var angle = startAngel + counter * interval; move( child, RelativeLayoutCalculator.GetRelativePositionByRadian( master, WidthRequest * 2.0, angle), 0.8); } else { move(child, master.Bounds, 0.0); } counter++; } }
private static Rectangle GetBoundByRadian(View dependency, View master) { var widthFactor = GetWidthFactor(dependency); var heightFactor = GetHeightFactor(dependency); var r = GetR(dependency); var degree = GetDegree(dependency); return(RelativeLayoutCalculator.GetRelativePositionByRadian( master, r, degree, widthFactor, heightFactor)); }