Ejemplo n.º 1
0
        protected override void SourceRectangleFiltered()
        {
            base.SourceRectangleFiltered();

            var horizontalSnapped = HorizontalEdges.Where(EdgeIsSnappedToSnappableHorizontalEdges);
            var verticalSnapped   = VerticalEdges.Where(EdgeIsSnappedToSnappableVerticalEdges);

            var snappedEdges = horizontalSnapped.Concat(verticalSnapped);

            UnderlyingSnappedEdges.SynchronizeListTo(snappedEdges.ToList());
        }
Ejemplo n.º 2
0
        private void GenerateEdges()
        {
            HorizontalEdges.Clear();
            VerticalEdges.Clear();

            foreach (var canvasItem in Items)
            {
                HorizontalEdges.Add(canvasItem.Left);
                HorizontalEdges.Add(canvasItem.Left + canvasItem.Width);
                VerticalEdges.Add(canvasItem.Left);
                VerticalEdges.Add(canvasItem.Top + canvasItem.Height);
            }
        }