示例#1
0
 public LayoutParameters(Gravity gravityX             = Gravity.Start,
                         Gravity gravityY             = Gravity.Start,
                         int offsetX                  = 0,
                         int offsetY                  = 0,
                         LayoutFilling layoutFillingX = LayoutFilling.WrapContent,
                         LayoutFilling layoutFillingY = LayoutFilling.WrapContent)
 {
     GravityX       = gravityX;
     GravityY       = gravityY;
     OffsetX        = offsetX;
     OffsetY        = offsetY;
     LayoutFillingX = layoutFillingX;
     LayoutFillingY = layoutFillingY;
 }
示例#2
0
        protected int GetFiilingValue(int viewportValue, int contentValue, LayoutFilling layoutFilling)
        {
            switch (layoutFilling)
            {
            case LayoutFilling.MatchViewport:
                return(viewportValue);

            case LayoutFilling.None:
                return(0);

            case LayoutFilling.WrapContent:
                return(contentValue);
            }

            return(0);
        }