Example #1
0
        /// <summary>
        /// Create a box
        /// </summary>
        /// <param name="data">data to show</param>
        /// <param name="ui">ui properties</param>
        public static UXBox CreateUXBox(Marshalling.MarshallingHash data, Marshalling.MarshallingHash ui)
        {
            UXBox box = new UXBox();

            box.Bind(data);
            box.Bind(ui);
            return(box);
        }
Example #2
0
        /// <summary>
        /// Create a box
        /// </summary>
        /// <param name="properties">props</param>
        /// <returns>ux read only text</returns>
        public static UXBox CreateBox(Marshalling.MarshallingHash properties, int width, int height)
        {
            UXBox im = UXBox.CreateUXBox("box", () =>
            {
                return(new Dictionary <string, dynamic>()
                {
                    { "Width", width },
                    { "Height", height },
                    { "Constraint-Width", "FIXED" },
                    { "Constraint-Height", "FIXED" }
                });
            });

            if (properties != null)
            {
                im.Bind(properties);
            }
            return(im);
        }