Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
225
NameColumnWidth Auto (for long-named properties)
posted

Hi,

I'm having trouble setting the NameColumnWidth attribute of the xamPropertyGrid to Auto, I believe it requires a double only. Ideally I'd like it to be Auto so that it sizes to fit the full property names without the user having to do any resizing.

Regards,

Tom.

Parents
No Data
Reply
  • 17475
    Verified Answer
    Offline posted

    Hi Tom,

    That is correct. The NameColumnWidth attribute requires double values. In order to set the width of the elements to auto resize or to apply custom logic for calculating the value you can modify the ColumnDefinition of the PART_DisplayNameBorder parent grid. I have shared a sample application to illustrate the behavior.

    XamPropertyGridColumnWidth.zip
Children