I have found the issue with this.
On an add the current property settings are probably the cause.
My issue occurred due to the IsActive Property being set to true before adding it to the screen.
AKA My fix:
You maybe able to toggle the IsActive to true after the addition of the newPane to the layout.
On an add the current property settings are probably the cause.
My issue occurred due to the IsActive Property being set to true before adding it to the screen.
AKA My fix:
newPane.IsActive = true; => newPane.IsActive = false;
I had almost the exact same stack trace. Took some experimentation to figure out the cause.You maybe able to toggle the IsActive to true after the addition of the newPane to the layout.