예제 #1
0
        protected override void ApplyProps(UIViewProps props, IView parent)
        {
            if (props == null)
            {
                throw new ArgumentNullException(nameof(props));
            }

            if (!(props is FlexboxLayoutProps layoutSettings))
            {
                throw new ArgumentException("FlexboxLayout: The given settings is not FlexboxLayoutSettings");
            }

            base.ApplyProps(props, parent);

            AlignItems    = layoutSettings.AlignItems;
            Direction     = layoutSettings.Direction;
            MarginBetween = layoutSettings.MarginBetween;

            if (Direction == FlexboxDirection.COLUMN || Direction == FlexboxDirection.COLUMN_REVERSE)
            {
                SizeY = 0f;
            }
            else
            {
                SizeX = 0f;
            }
        }
예제 #2
0
파일: UILayout.cs 프로젝트: Matodor/mUI
 protected override void ApplyProps(UIViewProps props, IView parent)
 {
     base.ApplyProps(props, parent);
 }