Beispiel #1
0
        public static string GetName(BoxLayoutAlign type, Layout theLayout)
        {
            string result = String.Empty;

            switch (type)
            {
            case BoxLayoutAlign.Top:
            case BoxLayoutAlign.Start:
                if (theLayout == Layout.HBox)
                {
                    result = "top";
                }
                else
                {
                    result = "left";
                }
                break;

            case BoxLayoutAlign.Middle:
            case BoxLayoutAlign.Center:
                if (theLayout == Layout.HBox)
                {
                    result = "middle";
                }
                else
                {
                    result = "center";
                }
                break;

            case BoxLayoutAlign.Stretch:
                result = "stretch";
                break;

            case BoxLayoutAlign.StretchMax:
                result = "stretchmax";
                break;
            }

            return(result);
        }
Beispiel #2
0
        public static string GetName(BoxLayoutAlign type, Layout theLayout)
        {
            string result = String.Empty;

            switch (type)
            {
                case BoxLayoutAlign.Top:
                case BoxLayoutAlign.Start:
                    if (theLayout == Layout.HBox)
                    {
                        result = "top";
                    }
                    else
                    {
                        result = "left";
                    }
                    break;
                case BoxLayoutAlign.Middle:
                case BoxLayoutAlign.Center:
                    if (theLayout == Layout.HBox)
                    {
                        result = "middle";
                    }
                    else
                    {
                        result = "center";
                    }
                    break;
                case BoxLayoutAlign.Stretch:
                    result = "stretch";
                    break;
                case BoxLayoutAlign.StretchMax:
                    result = "stretchmax";
                    break;
            }

            return result;
        }