override protected void CreateChildren() { base.CreateChildren(); //Scroller scroller = new Scroller // { // SkinClass = typeof(ScrollerSkin2), // Left = 0, // Right = 0, // Top = 0, // Bottom = 0 // }; ////scroller.SetStyle("horizontalScrollPolicy", ScrollPolicy.Off); ////scroller.SetStyle("verticalScrollPolicy", ScrollPolicy.Off); //AddChild(scroller); //Group viewport = new Group // { // Layout = new VerticalLayout // { // HorizontalAlign = HorizontalAlign.Left, // PaddingLeft = 10, PaddingRight = 10, PaddingTop = 10, PaddingBottom = 10, // Gap = 10 // } // }; //scroller.Viewport = viewport; #region Controls HGroup hbox = new HGroup { VerticalAlign = VerticalAlign.Middle, PaddingLeft = 10, PaddingRight = 10, PaddingTop = 10, PaddingBottom = 10, Gap = 10 }; hbox.SetStyle("showBackground", true); hbox.SetStyle("backgroundColor", ColorMixer.FromHex(0x004CFF).ToColor()); /*viewport.*/ AddChild(hbox); Button button = new Button { Text = "Increase width", SkinClass = typeof(ImageButtonSkin), Icon = ImageLoader.Instance.Load("Icons/shape_square_add") }; button.Click += delegate { button.Width += 10; _dataProvider.AddItem("miki " + button.Width); }; hbox.AddChild(button); Button btnWindow = new Button { Text = "New window", FocusEnabled = false, SkinClass = typeof(ImageButtonSkin), Icon = ImageLoader.Instance.Load("Icons/comment") }; btnWindow.Click += delegate { //_container.RemoveAllChildren(); //for (int i = _container.NumberOfChildren - 1; i >= 0; i--) //{ // _container.RemoveContentChildAt(i); //} //_container.RemoveAllContentChildren(); //_count = 0; _count++; var window = new MyWindow { Title = "The Window " + _count, Id = "window_" + _count, SkinClass = typeof(WindowSkin2), Icon = ImageLoader.Instance.Load("Icons/balloon_32"), Width = 400, Height = 600 }; //System.Random rnd = new System.Random(); //if (rnd.Next(2) > 0) window.Plugins.Add(new Resizable { ShowOverlay = false }); window.AddEventListener(CloseEvent.CLOSE, delegate { PopupManager.Instance.RemovePopup(window); }); #region Cannot use plugin! // NOTE: We cannot use the plugin having a DragHandle because the placehoder group is being switched live // we just have to use the MoveArea skin part and do the dragging thing from inside the Dialog //var draggable = new Draggable // { // DragHandle = b.HeaderGroup // }; //b.Plugins.Add(draggable); #endregion PopupManager.Instance.AddPopup(window, false); PopupManager.Instance.CenterPopUp(window); }; hbox.AddChild(btnWindow); #endregion hbox = new HGroup { PaddingLeft = 10, PaddingRight = 10, PaddingTop = 10, PaddingBottom = 10, Gap = 10 }; //hbox.SetStyle("showBackground", true); //hbox.SetStyle("backgroundColor", RgbColor.FromHex(0x004CFF).ToColor()); /*viewport.*/ AddChild(hbox); #region Data controls List <object> source = new List <object> { "Failure", "Teaches", "Success", "One", "Two", "Three", "Four", "Five", "Six" }; _dataProvider = new ArrayList(source); var factory = new ItemRendererFactory <DefaultItemRenderer>(); //DataGroup dataGroup = new DataGroup // { // Layout = new VerticalLayout(), // DataProvider = _dataProvider, // //ItemRenderer = new ItemRendererFactory <DefaultItemRenderer>(), // ItemRendererFunction = delegate(object item) // { // return factory; // } // }; //hbox.AddChild(dataGroup); //dataGroup = new DataGroup // { // Layout = new TileLayout { RequestedColumnCount = 4 }, // //Width = 200, Height = 200, // DataProvider = _dataProvider, // //ItemRenderer = new ItemRendererFactory <DefaultItemRenderer>(), // ItemRendererFunction = delegate // { // return factory; // }, // //ClipAndEnableScrolling = true // }; //hbox.AddChild(dataGroup); List list = new List { //Layout = new TileLayout { RequestedColumnCount = 4 }, Width = 200, Height = 200, Left = 100, Top = 50, DataProvider = _dataProvider, //ItemRenderer = new ItemRendererFactory <DefaultItemRenderer>(), ItemRendererFunction = delegate { return(factory); } }; /*viewport.*/ AddChild(list); #endregion }