コード例 #1
0
        /// <summary>
        /// Create a window
        /// </summary>
        /// <param name="properties">props</param>
        /// <returns>ux window</returns>
        public static UXWindow CreateWindow(Marshalling.MarshallingHash properties, int width, int height, params UXControl[] controls)
        {
            UXWindow win = UXWindow.CreateUXWindow("win", () =>
            {
                return(new Dictionary <string, dynamic>()
                {
                    { "Width", width },
                    { "Height", height },
                    { "Constraint-Width", "FIXED" },
                    { "Constraint-Height", "FIXED" },
                    {
                        "children",
                        ChildCollection.CreateChildCollection("children", () => {
                            return controls.ToList();
                        })
                    }
                });
            });

            if (properties != null)
            {
                win.Bind(properties);
            }
            return(win);
        }
コード例 #2
0
 /// <summary>
 /// Create children
 /// </summary>
 /// <param name="controls">children to add</param>
 /// <returns>a ChildCollection</returns>
 public static ChildCollection CreateChildren(params UXControl[] controls)
 {
     return(ChildCollection.CreateChildCollection("children", () =>
     {
         return controls.ToList();
     }));
 }