Invert WPF GridView to bind items to columns instead of rows

女生的网名这么多〃 提交于 2019-12-21 12:49:11

问题


Is there a simple way to invert a WPF GridView so that items are bound to columns instead of rows? Or would it be necessary to write a custom view mode?


回答1:


If you would like to show 3 columns with simple values, and then a last column with collection of data as itemssource, then you can put a grid within the last cell and trasform it 90 degrees.

This is the way, and also gives a performance improvement as adding and rendering columns is much slower than adding rows to a grid.



来源:https://stackoverflow.com/questions/2404789/invert-wpf-gridview-to-bind-items-to-columns-instead-of-rows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!