My application performs an automatic layout restoration during launch.
The call is done from the page constructor.
To produce the issue, we perform the following:
- Drag a LayoutAnchorableFloatingWindow to a second monitor
- Maximize it
- Save layout
- Restart application
When this is done, the LayoutAnchorableFloatingWindow is not restored to maximized state.
After some testing it seems this is caused by a small piece of the restoration logic being run in the wrong thread.
Specifically, the Show call is being done via Dispatcher.BeginInvoke() while WindowState property is set outside of this.
I have made changes to correct the behavior by moving the setting of WindowState to within the same scope as Show(), and will create a pull request.