Dynamically show/hide Header or Footer of Xamarin.Forms.ListView

后端 未结 7 1721
粉色の甜心
粉色の甜心 2021-02-09 18:29

Is there a way to dynamically show/hide the header of a ListView based on a condition at runtime.



        
7条回答
  •  渐次进展
    2021-02-09 18:31

    You can wrap your footer template in a ViewCell, then set the ViewCell's Height to 0 when you don't want it to show. If you do this, make sure to set the ListView.HasUnevenRows property to True:

    
    
        
            
                
                    
            
        
    
    
    
    
    

提交回复
热议问题