public UIHolderBox AddNewImageBox(int x, int y, int w, int h, ImageBinder imgBinder) { //add new user box var box1 = new UIHolderBox(w, h); box1.BackColor = Color.White; box1.SetLocation(x, y); var imgBox = new LayoutFarm.CustomWidgets.ImageBox(imgBinder.Image.Width, imgBinder.Image.Height); imgBox.ImageBinder = imgBinder; box1.AddChild(imgBox); imgBox.SetLocation(10, 10); box1.TargetBox = imgBox; box1.SetSize(imgBinder.ImageWidth + 20, imgBinder.ImageHeight + 20); SetupActiveBoxProperties(box1); viewport.AddContent(box1); userBoxes.Add(box1); return(box1); }
public UIHolderBox AddNewImageBox(int x, int y, int w, int h, ImageBinder imgBinder) { //add new user box var box1 = new UIHolderBox(w, h); box1.BackColor = Color.White; box1.SetLocation(x, y); var imgBox = new LayoutFarm.CustomWidgets.ImageBox(imgBinder.Image.Width, imgBinder.Image.Height); imgBox.ImageBinder = imgBinder; box1.AddChild(imgBox); imgBox.SetLocation(10, 10); box1.TargetBox = imgBox; box1.SetSize(imgBinder.ImageWidth + 20, imgBinder.ImageHeight + 20); SetupActiveBoxProperties(box1); viewport.AddContent(box1); userBoxes.Add(box1); return box1; }