WrapPanel: Trying to make the ItemWidth equal to the max width of any one element

后端 未结 3 581
情话喂你
情话喂你 2021-01-12 07:01

Hopefully no one else has already asked this question, but I have searched and cannot find any mention. Feel free to point me in the right direction if I missed another que

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-12 07:21

    Try the following. The part to pay attention to is the Grid.IsSharedSizeScope="True" on the wrap panel AND the column definition's SharedSizeGroup property.

    
        
            
                
                    
                
                
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                    
                        
                            
                        
                        
                    
                
            
        
    
    

提交回复
热议问题