void FindSelectedUserBoxes()
{
//find users box in selected area
int j = this.bgbox.ChildCount;
var primSelectionBox = selectionBox.GetPrimaryRenderElement(rootgfx);
var primGlobalPoint = primSelectionBox.GetGlobalLocation();
var selectedRectArea = new Rectangle(primGlobalPoint, primSelectionBox.Size);
List<UIBox> selectedList = new List<UIBox>();
for (int i = 0; i < j; ++i)
{
var box = bgbox.GetChild(i) as UIBox;
if (box == null)
{
continue;
}
var primElement = box.GetPrimaryRenderElement(rootgfx);
if (!primElement.Visible)
{
continue;
}
//get global area
Point globalLocation = primElement.GetGlobalLocation();
var userElementArea = new Rectangle(globalLocation, primElement.Size);
if (selectedRectArea.Contains(userElementArea))
{
//selected= true;
selectedList.Add(box);
//------
//create user controller box for the selected box
UIControllerBox userControllerBox = GetFreeUserControllerBox();
userControllerBox.TargetBox = box;
var globalTargetPos = box.GetGlobalLocation();
userControllerBox.SetLocation(globalTargetPos.X - 5, globalTargetPos.Y - 5);
userControllerBox.SetSize(box.Width + 10, box.Height + 10);
userControllerBox.Visible = true;
viewport.AddContent(userControllerBox);
}
}
}
void SetupActiveBoxProperties(LayoutFarm.CustomWidgets.EaseBox box)