How do I databind a ColumnDefinition's Width or RowDefinition's Height?

后端 未结 4 1456
南旧
南旧 2020-12-03 02:54

Under the View-Model-ViewModel pattern for WPF, I am trying to databind the Heights and Widths of various definitions for grid controls, so I can store the values the user s

4条回答
  •  有刺的猬
    2020-12-03 03:07

    The easiest solution is to simply use string settings for these properties so that WPF will automatically support them using GridLengthConverter without any extra work.

提交回复
热议问题