Пример #1
0
        public void AddAfterSelectedBoxes(IEnumerable <TessBoxControl> selectedBoxes)
        {
            var box = selectedBoxes.LastOrDefault();

            if (box != null)
            {
                var pos    = Boxes.IndexOf(box);
                var newBox = new TessBoxControl()
                {
                    Width  = box.Width,
                    Height = box.Height,
                    Value  = "n"
                };
                Canvas.SetLeft(newBox, box.Left + box.Width);
                Canvas.SetTop(newBox, box.Top);
                Boxes.Insert(pos + 1, newBox);
            }
        }