这是indexloc提供的服务,不要输入任何密码
Skip to content

Null Reference Exception inserting documents when isActive is set before insertion #17

@Dirkster99

Description

@Dirkster99

Original Issue: #1481

I have an application using the AvalonDock library, and to fix an issue with new documents not showing content correctly (#1480), we have to set the IsActive property on the LayoutDocument to true in the BeforeInsertDocument method of the ILayoutUpdateStrategy implementation.

With this setup, the library throws a Null Reference Exception under these circumstances:

  1. Open enough new documents such that the tab headers fill the available width of the screen.
  2. The next document you open will be added at the start of the list instead of the end
  3. Click inside the document to give it focus
  4. Open another new document
  5. AvalonDock throws a Null Reference Exception

I have been able to produce a sample application that produces the same error; which is simply the DocumentOpenSample modified to set the IsActive property as described.

DocumentOpenSample.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions