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:
- Open enough new documents such that the tab headers fill the available width of the screen.
- The next document you open will be added at the start of the list instead of the end
- Click inside the document to give it focus
- Open another new document
- 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