Skip to content

Commit bed1d1c

Browse files
committed
add protected method to override snaplines objects
1 parent a18a1a0 commit bed1d1c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

WpfDesign.Designer/Project/Extensions/SnaplinePlacementBehavior.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,16 @@ private IEnumerable<DesignItem> AllDesignItems(DesignItem designItem = null)
332332
}
333333
}
334334
}
335+
336+
/// <summary>
337+
/// Method Returns the DesignItems for wich Snaplines are created
338+
/// </summary>
339+
/// <param name="operation"></param>
340+
/// <returns></returns>
341+
protected IEnumerable<DesignItem> GetSnapToDesignItems(PlacementOperation operation)
342+
{
343+
return AllDesignItems();
344+
}
335345

336346
void BuildMaps(PlacementOperation operation)
337347
{
@@ -351,7 +361,7 @@ void BuildMaps(PlacementOperation operation)
351361
if (!CanPlace(operation.PlacedItems.Select(x => x.Item), operation.Type, PlacementAlignment.Center))
352362
return;
353363

354-
foreach (var item in AllDesignItems()
364+
foreach (var item in GetSnapToDesignItems(operation)
355365
.Except(operation.PlacedItems.Select(f => f.Item))
356366
.Where(x=> x.View != null && !GetDisableSnaplines(x.View))) {
357367
if (item != null) {

0 commit comments

Comments
 (0)