|
|
|
|
@ -189,7 +189,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
@@ -189,7 +189,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
|
|
|
|
|
AddLines(containerRect, 0, false); |
|
|
|
|
|
|
|
|
|
foreach (var item in ExtendedItem.ContentProperty.CollectionElements |
|
|
|
|
.Except(operation.PlacedItems.Select(f => f.Item))) |
|
|
|
|
.Except(operation.PlacedItems.Select(f => f.Item))) |
|
|
|
|
{ |
|
|
|
|
var bounds = GetPosition(operation, item); |
|
|
|
|
|
|
|
|
|
@ -217,6 +217,12 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
@@ -217,6 +217,12 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
|
|
|
|
|
v.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Left - 1, Start = r.Top, End = r.Bottom }); |
|
|
|
|
if (filter == null || filter.Value.Horizontal == HorizontalAlignment.Right) |
|
|
|
|
v.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Right - 1, Start = r.Top, End = r.Bottom }); |
|
|
|
|
|
|
|
|
|
if (filter == null) |
|
|
|
|
{ |
|
|
|
|
h.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Top + Math.Abs((r2.Top - r2.Bottom) / 2), Start = r.Left, End = r.Right }); |
|
|
|
|
v.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Left + Math.Abs((r2.Left - r2.Right) / 2), Start = r.Top, End = r.Bottom }); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void AddBaseline(DesignItem item, Rect bounds, List<Snapline> list) |
|
|
|
|
@ -279,7 +285,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
@@ -279,7 +285,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static bool Snap(List<Snapline> input, List<Snapline> map, double accuracy, |
|
|
|
|
out List<Snapline> drawLines, out double delta) |
|
|
|
|
out List<Snapline> drawLines, out double delta) |
|
|
|
|
{ |
|
|
|
|
delta = double.MaxValue; |
|
|
|
|
drawLines = null; |
|
|
|
|
@ -288,7 +294,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
@@ -288,7 +294,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
|
|
|
|
|
foreach (var mapLine in map) { |
|
|
|
|
if (Math.Abs(mapLine.Offset - inputLine.Offset) <= accuracy) { |
|
|
|
|
if (!inputLine.RequireOverlap && !mapLine.RequireOverlap || |
|
|
|
|
Math.Max(inputLine.Start, mapLine.Start) < Math.Min(inputLine.End, mapLine.End)) |
|
|
|
|
Math.Max(inputLine.Start, mapLine.Start) < Math.Min(inputLine.End, mapLine.End)) |
|
|
|
|
{ |
|
|
|
|
if (mapLine.Group == inputLine.Group) |
|
|
|
|
delta = mapLine.Offset - inputLine.Offset; |
|
|
|
|
|