TextBlock TextWrapping not wrapping

前端 未结 4 544
野趣味
野趣味 2020-12-10 00:48

When I place a TextBlock inside of a Horizontally Aligned StackPanel it does not wrap. I realize that this is because the available width of the StackPanel is PositiveInfini

4条回答
  •  天命终不由人
    2020-12-10 01:15

    You could use a grid instead of the StackPanel (which as explained does not restrict its content.). A grid allows much more control over layout of items than a StackPanel does and if your image is collapsed then the 'auto' column will have a 0 width.

    
        
            
                
                
            
            
            
        
    
    
    

提交回复
热议问题