is there a datatemplate for grid panel elements in WPF?

前端 未结 2 1345
抹茶落季
抹茶落季 2020-12-29 15:45

Fairly new to WPF...

I have a collection of data I would like to bind to a grid panel. Each object contains its grid row and column, as well as stuff to fill in at

2条回答
  •  甜味超标
    2020-12-29 16:38

    Not sure if this will help you, but why don't you try setting the ItemsPanel of an ItemsControl (ListBox, ListView) to a UniformGrid. Something like this:

    
        
            
                
            
        
    
    

    It's similar to the previous solution, only a little more dynamic.

提交回复
热议问题