Did WPF 4.5 parent-child behavior change: we can now add a child to another parent without exception?

后端 未结 1 1206
南方客
南方客 2021-02-04 10:22

In .Net 4.0 the following code throws an InvalidOperationException with the message \"Specified element is already the logical child of another element. Disconn

1条回答
  •  我在风中等你
    2021-02-04 11:13

    There are times when it makes sense for a child to have more than one logical parent, for instance in layout-to-layout animation. I'm guessing the WPF team decided it was time to let developers decide when and how to use this instead of disallowing it.

    0 讨论(0)
提交回复
热议问题