예제 #1
0
 public static T FrameConstraints <T>(this T view, FrameConstraints constraints, bool cascades = false) where T : View
 {
     view.SetEnvironment(EnvironmentKeys.Layout.FrameConstraints, constraints, cascades);
     return(view);
 }
예제 #2
0
        public static FrameConstraints GetFrameConstraints(this View view, FrameConstraints defaultContraints = null)
        {
            var constraints = view.GetEnvironment <FrameConstraints>(view, EnvironmentKeys.Layout.FrameConstraints);

            return(constraints ?? defaultContraints);
        }
 public static FrameConstraints Lerp(this FrameConstraints start, FrameConstraints end, double progress)
 => new FrameConstraints(width: start.Width.Lerp(end.Width, progress),
                         height: start.Height.Lerp(end.Height, progress),
                         alignment: start.Alignment.GenericLerp(end.Alignment, progress));