DockSite serialization loses bindings on ToolWindow.Title

Docking/MDI for WPF Forum

Posted 10 years ago by Phil Devaney - Senior Software Engineer, Serck Controls Ltd
Version: 9.1.0503
Platform: .NET 3.5
Environment: Windows Vista (64-bit)
Avatar
My application has a multilingual user interface that needs to change language without restarting the application. To implement this I am using data-binding extensively, but when I bind the Title property of a ToolWindow, the binding is lost if I restore the window layout with DockSiteLayoutSerializer and the Title is set to value that was serialized.

I have emailed a simple sample to support that demonstrates the problem. The sample has a single ToolWindow with three buttons that toggle its Title (via data-binding). The window layout is serialized in Window.Loaded & Window.Closing. The first time the app is run the buttons work, but if the app is restarted they don't as the layout has been serialized. Delete user.config and restart, and the buttons work again.

Phil

Comments (3)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Phil,

I've added the CanLoadToolWindowTitles property to the DockSiteLayoutSerializer class, which allows you to turn off the loading of titles. This basically preserves the Binding statements already defined on the tool windows, instead of overwriting them with the serialized string.

Hope this helps.


Actipro Software Support

Posted 9 years ago by Markus Springweiler
Avatar
Hi,

may I ask a silly question: Is there one single customer out there which would ever need the (de)serialization of a ToolWindow-Title?

I nearly lost my belief in my xaml competence some days ago before I realized that there was no (more) copy&paste artifact in my code.
Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

Just fyi, we've removed the serialization of the Title from the latest version of WPF Studio.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.