Fix dragging of Elements wich are not contained in the Content Property of their Container
This commit is contained in:
Родитель
36753f4cb0
Коммит
1f5b35e5d7
|
@ -100,18 +100,18 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
|
|||
}
|
||||
|
||||
public virtual void LeaveContainer(PlacementOperation operation)
|
||||
{
|
||||
if (ExtendedItem.ContentProperty.IsCollection)
|
||||
{
|
||||
foreach (var info in operation.PlacedItems)
|
||||
{
|
||||
ExtendedItem.ContentProperty.CollectionElements.Remove(info.Item);
|
||||
}
|
||||
{
|
||||
foreach (var info in operation.PlacedItems) {
|
||||
var parentProperty = info.Item.ParentProperty;
|
||||
if (parentProperty.IsCollection)
|
||||
{
|
||||
parentProperty.CollectionElements.Remove(info.Item);
|
||||
}
|
||||
else
|
||||
{
|
||||
parentProperty.Reset();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ExtendedItem.ContentProperty.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
private static InfoTextEnterArea infoTextEnterArea;
|
||||
|
|
Загрузка…
Ссылка в новой задаче