Skip to content

Dock target disappears when clicking another dock before mouse release and error control has no logical parent. #861

@cirrusone

Description

@cirrusone

Some of the sample projects raise errors on Program.Main when attempting to dock in certain scenarios. One example I can replicate is on the NestedDockSample.


System.InvalidOperationException
  HResult=0x80131509
  Message=AttachedToLogicalTreeCore called for 'Document' but control has no logical parent.
  Source=<Cannot evaluate the exception source>
  StackTrace:
<Cannot evaluate the exception stack trace>

  This exception was originally thrown at this call stack:
    [External Code]
    NestedDockSample.Program.Main(string[]) in Program.cs

Program.cs:line 12

See video of NestedDockSample:

  1. Dock Tool Document into centre of Inner Document 1 Content
  2. Attempt to Dock Document 2 into centre of Nested tool document content - however, after clicking the required dock target is no longer visible as Document 2 is selected instead/

Image

I see two issues here:

1/ Impossible docks should gracefully cancel rather than raise errors.
2/ Should docks only become active/selected after Mouse Up/ release? Otherwise dock target may disappear before drag can occur. Typically this only occurs when docks occupy the same parent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions