What is difference between “ * ” and “Auto” in Silverlight Grid Layout Definitions

后端 未结 3 1945
谎友^
谎友^ 2021-02-01 05:59

trying to understand the following:


    
        
        

        
3条回答
  •  青春惊慌失措
    2021-02-01 06:42

    Auto means give this column/row the size of the contained items.

    * means share the rest of the available space with other columns/rows that also specify *.

    In fact * is equivalent to 1*. It is possible to specify 2*, 3* ... N* for a width or height. The algorithm Silverlight uses is to total all values of N for all the rows using * then give each row its appropriate share of the available space. For example:-

    
        
        
        
        
    
    

    This would first determine how high the forth row needs to be from its content and substract that from the full availabe height. The remainder of height will be divided amoungst the * rows. The first getting 1/6, the second getting a 1/3 and the third getting 1/2 of the available height.

提交回复
热议问题