sharedsizegroup

Share column width between Grids in items of an ItemsControl

回眸只為那壹抹淺笑 提交于 2020-02-06 05:02:04
问题 I'm writing a control to display and edit objects in a form. The control ( FormDataView ) is an ItemsControl where each item is a FormField control made of a Grid , with the field name in the left column and the editor (e.g. TextBox) in the right column. In order to align the editors, I want the first column in each Grid to share the same width. So I tried to use IsSharedSizeScope and SharedSizeGroup , but it doesn't work, the first column has a different width in each FormField . Here are