DocumentWindow name property - limits & usage?

Docking/MDI for WPF Forum

Posted 9 years ago by Aled Hughes - Principal Software Engineer, Control Techniques Ltd.
Version: 9.2.0514
Avatar
Hi,
On the DocumentWindow class constructor we have a "Name" parameter which I was trying to set to a string representation of a Guid but this throws an exception. I couldn't see anywhere where this parameter is detailed so what limits are imposed on it? Seems odd that I can't just set it to something like a Guid. Also, I did stumble upon a comment in the docs that Name is used for layout serialisation, but is there anything else it's used for?
Thanks.

Comments (2)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Aled,

That parameter gets passed right to the FrameworkElement.Name property, so it would need to conform to what that property requires. Think of it the same as if you set x:Name attributes in your XAML.

So in addition to our using it in layout serialization to help you identify what is what in that file, it is used throughout WPF wherever FrameworkElement.Name is used.

The safest bet it to stick with C#/VB identifier syntax there, meaning starts with an underscore or letter, and contains underscores, letters, or digits.


Actipro Software Support

Posted 9 years ago by Aled Hughes - Principal Software Engineer, Control Techniques Ltd.
Avatar
Thanks. I was wondering if it was inherited and Intellisense in VS does tell me that, so not sure how I missed it!
The latest build of this product (v2018.1 build 0675) 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.