WPF Dynamic Layout with ItemsControl and Grid

前端 未结 1 1726
青春惊慌失措
青春惊慌失措 2020-12-02 17:15

I am creating a WPF form. One of the requirements is that it have a sector-based layout so that a control can be explicitly placed in one of the sectors/cells.

I hav

相关标签:
1条回答
  • 2020-12-02 17:58

    You're on the right track. You just need to create a Style and apply it to the ItemsControl.ItemContainerStyle. Then, in the style, specify a setter for the Grid.Row and Grid.Column. The ItemContainerStyle will get applied to the containers generated for each item.

    0 讨论(0)
提交回复
热议问题